简体   繁体   中英

Comparing two columns in excel for similarities

I have two columns in excel A and B from 1 - 1400

The value in column A is 10 characters, "K0123456789" and column B is 9 characters "0123456789"

I need to compare the value in column B is the same value as column A without the "k" and highlight it if they do not match. I am not familiar with excel too much, so any information here would help so I do not have to go through all these lines myself on a daily basis.

Thanks for any help!

GenZade

You can put a formula in column C such as (For cell C1):

=IF(A1="K"&B1,"Match","No Match")

Of course, you could also add conditional formatting with a similar formula if you want to literally highlight it.

i would have just commented on neelsg post, but i don't have enough reputation for that, apologies. his solution works based on string values rather than numerical values. Some kind of preceding zeros might not work nicely with it. to compare actual numerical values you can use the following: =IF(RIGHT(A1,LEN(A1)-1)*1=B1,"match","no match")

so depends if you want to match them as strings or actual numbers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM