简体   繁体   中英

Excel VLOOKUP for multiple values

I have an array of cells and I want excel to return the same value for more than one cell. as an example,

If the cell says BG or CE or TF I want it to return “1” If it says KR or TA or MN I want it to return “2” And so on. How would this work? Thanks a lot!

This would be perfect for a VLOOKUP() (with the exception that I don't know what "...and so on" refers to).

If your data is in column A, and you want to put the 1 or 2 in column B, you just create a separate table:

在此处输入图片说明

then use this formula in B1 and drag down:

=VLOOKUP(A1,$E$1:$F$6,2,FALSE)

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