简体   繁体   中英

Excel - Formula to find value on spreadsheet plus its status in another column

I have a list of 60,000+ Meters with status'. I'd like to paste a list of meters from another source and plug in a value to tell me what the status is for that meter automatically instead of searching each one.

For example:

If I was asked "What is the status for 4972617, 4869966, and 4822118" and had the list in excel form, I'd like to dump them in a column of their own and apply a formula to tell me it found the meter and it's notation is exchanged! Something I would place in G3 in my example below...

LIST:

COLUMN A        COLUMN B                  COLUMN F    COLUMN G
Status           Meter                     Search      
Exchanged       4972617                   4972617     =????
Exchanged       4869966                   4869966
Open            4822118                   4822118   
Exchanged       5020631
Exchanged       4954834
Open            1337554
Open            5148459

If you can switch column A and B, you can use VLOOKUP like this in cell G2:

=VLOOKUP(F2, A:B, 2, FALSE)

And then copy/paste the formula down.

If you cannot switch columns A and B, you will have to use INDEX and MATCH like this:

=INDEX(A:A, MATCH(F2, B:B, 0))

VLOOKUP will do your bidding.

Say your meters are in column A and the statuses are in column B.

Type in the meters you want to search for in column F, as you have them.

In G1, put in this:

=VLOOKUP(C1, A:B, 2, FALSE)

And fill down as far as you need. This will put the corresponding status next to the meter ID.

But, if you're doing a lot of queries like this, I'd learn how to use Microsoft Access.

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