简体   繁体   中英

Excel formula to return value of cell in column A based off the relative cell value in column B

I'm working on a spreadsheet that has order number's in column A and the associated dates in column B. I can seem to get a correctly functioning formula that will find the earliest date in column B and return the associated order number from column A.

I've tried using INDEX and VLOOKUP formulas and managed to get it to return a date using =MIN(IF(B$1:B$99,A$1:A$99,"")) but when reversed it only returns the lowest order number.

=MIN(IF(B$1:B$99,A$1:A$99,"")) Returns lowest date or lowest order number.

I need the order number associated with the earliest date

This should do it:

=INDEX(A1:A10,MATCH(MIN(B1:B10),B1:B10,0))

Used sample range for orders A1:A10 and dates B1:B10 . Just change accordingly.

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