Part of this formula gives me what I need ie the IF function, the wrong date is however returned. I suspect that the SMALL function is the issue because I want the 4th and the 10th record and I keep getting 1 only. Don't think I'm far off the actual solution and I'll add the IFERROR to remove the error notifications. Perhaps the FILTER function would be more appropriate, anyway looking for anything that works.
Lookups Match.xlsx | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Date | Products | Lookup | Date of transaction | |||
2 | Saturday, September 3, 2022 | Lock and hasp | Sink | Saturday, September 3, 2022 | |||
3 | Saturday, September 17, 2022 | Padlock | #N/A | ||||
4 | Wednesday, October 12, 2022 | Plastic | #N/A | ||||
5 | Wednesday, October 12, 2022 | Sink | |||||
6 | Saturday, October 15, 2022 | Cleaning products | |||||
7 | Tuesday, October 18, 2022 | Cleaning products | |||||
8 | Thursday, October 20, 2022 | String | |||||
9 | Tuesday, November 8, 2022 | Roller blind, gloves | |||||
10 | Sunday, November 20, 2022 | Screening, snail poison | |||||
11 | Wednesday, December 7, 2022 | Construction adhesive, Sink | |||||
12 | Saturday, December 10, 2022 | Lights | |||||
13 | Sunday, December 18, 2022 | Key, plugs | |||||
Sheet16 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2:E4 | E2 | =INDEX($A$2:$A$13,SMALL(IF(ISNUMBER(SEARCH($D$2,$B$2:$B$13)),ROW(B$2:$B2)-ROW($B$2)+1),ROWS(B$2:$B2))) |