Assistance with array formula

tigerzen

Board Regular
Joined
Mar 8, 2023
Messages
209
Office Version
  1. 365
Platform
  1. Windows
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
ABCDE
1DateProductsLookupDate of transaction
2Saturday, September 3, 2022Lock and haspSinkSaturday, September 3, 2022
3Saturday, September 17, 2022Padlock#N/A
4Wednesday, October 12, 2022Plastic#N/A
5Wednesday, October 12, 2022Sink
6Saturday, October 15, 2022Cleaning products
7Tuesday, October 18, 2022Cleaning products
8Thursday, October 20, 2022String
9Tuesday, November 8, 2022Roller blind, gloves
10Sunday, November 20, 2022Screening, snail poison
11Wednesday, December 7, 2022Construction adhesive, Sink
12Saturday, December 10, 2022Lights
13Sunday, December 18, 2022Key, plugs
Sheet16
Cell Formulas
RangeFormula
E2:E4E2=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)))
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Your first ROW() function should refer to the whole array and be absolute. If you have access to FILTER() you may use a more compact formula.

Book12
ABCDEFGH
1DateProductsLookupDate of transactionLookupDate of transaction
203-Sep-22Lock and haspSink12-Oct-22Sink12-Oct-22
317-Sep-22Padlock07-Dec-2207-Dec-22
412-Oct-22Plastic 
512-Oct-22Sink 
615-Oct-22Cleaning products 
718-Oct-22Cleaning products
820-Oct-22String
908-Nov-22Roller blind, gloves
1020-Nov-22Screening, snail poison
1107-Dec-22Construction adhesive, Sink
1210-Dec-22Lights
1318-Dec-22Key, plugs
Sheet1
Cell Formulas
RangeFormula
H2:H3H2=FILTER(A2:A13,ISNUMBER(SEARCH(G2,B2:B13)))
E2:E6E2=IFERROR(INDEX($A$2:$A$13,SMALL(IF(ISNUMBER(SEARCH($D$2,$B$2:$B$13)),ROW(B$2:$B$13)-ROW($B$2)+1),ROWS(B$2:$B2))),"")
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top