Hello, I am using Excel 2010 and I have this issue:
I have an inventory table where I register the entry of products.
Every time there is an entry of product, I should register its part number, the date of the entry, and the most recent date before the current entry.
Therefore, I am looking for a formula that automatically allows me to identify the closest date before the current entry of data I mentioned; however, it should only look within the dates that correspond to the item in the row (result 1). I also want to know the position of the cell (result 2) and then change the column (result 3)
Something like this:
ITEM DATE OF ENTRY Result I
A January 1, 2001 "FIRST ENTRY"
A January 22, 2001 January 20, 2001
A January 20, 2001 January 1, 2001
B January 4, 2001 "FIRST ENTRY"
B January 5, 2001 January 4, 2001
ITEM DATE OF ENTRY Result II
A January 1, 2001 "FIRST ENTRY"
A January 22, 2001 B3
A January 20, 2001 B1
B January 4, 2001 "FIRST ENTRY"
B January 5, 2001 B4
ITEM DATE OF ENTRY Result III
A January 1, 2001 "FIRST ENTRY"
A January 22, 2001 F3
A January 20, 2001 F1
B January 4, 2001 "FIRST ENTRY"
B January 5, 2001 F4
I think this retrieves the first result I want:
=IF(MAX(IF(IF($A$2:$A$6=A2,$B$2:$B$6)<B2,IF($A$2:$A$6=A2,$B$2:$B$6)))=0,"FIRST ENTRY",MAX(IF(IF($A$2:$A$6=A2,$B$2:$B$6)<B2,IF($A$2:$A$6=A2,$B$2:$B$6))))
CTRL+SHIFT+ENTER
How could I get 2 & 3?
What do you think?
Thank you!
PD. Thanks FDibbins for helping me with the title of the thread.
Bookmarks