Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
375 views
in Technique[技术] by (71.8m points)

excel - Match multiple columns over multiple sheets?

Sheet1
qwerty,1234
asdf,2345
zxcv,3456

Sheet2
uiop,0987
qwerty,6789
qwerty,1234
fghjk,4567
zxcv,3456
zxcv,7890

How to highlight the row in Sheet1 iff Sheet2 have at least 1 row that matches both columns? In this example, the rows qwerty,1234 and zxcv,3456 should be highlighted.

I need both data to be on the same row to match.

=NOT(ISNA(VLOOKUP(A1,Sheet2!$A:$A,1,FALSE))) matches only 1 column, how to do it for both?

question from:https://stackoverflow.com/questions/65912143/match-multiple-columns-over-multiple-sheets

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can also use Match() function like below. But COUNTIFS() would be best as it will be faster.

=MATCH($A1&$B1,Sheet2!$A$1:$A$5&Sheet2!$B$1:$B$5,0)

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...