简体   繁体   English

Excel公式基于B列中的相对像元值返回A列中的像元值

[英]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. 我正在处理一个电子表格,该电子表格的A列中有订单号,而B列中有相关的日期。我似乎得到了一个正确运行的公式,该公式将在B列中找到最早的日期,并从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. 我试过使用INDEX和VLOOKUP公式,并设法使用=MIN(IF(B$1:B$99,A$1:A$99,""))使其返回日期,但是反转后,它仅返回最低的订单号。

=MIN(IF(B$1:B$99,A$1:A$99,"")) Returns lowest date or lowest order number. =MIN(IF(B$1:B$99,A$1:A$99,""))返回最低日期或最低订单号。

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 . 订单A1:A10和日期B1:B10二手样本范围。 Just change accordingly. 只需相应地进行更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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