jonsharman
New Member
- Joined
- Jan 4, 2014
- Messages
- 28
Hi,
I have an array formula that I am trying to use to find specific order numbers based on a free-text search across a three-column table. The formula I am using is:
=IFERROR(INDEX($A$2:$D$14, SMALL(IF(ISERROR(SEARCH($F$4,$B$2:$D$14)*SEARCH($F$3,$B$2:$D$14)*SEARCH($F$2,$B$2:$D$14)), "", ROW(A2:A14)-MIN(ROW(A2:A14))+1), ROW(A1)), COLUMN(A1)),"")
And the data is laid out like so:
[TABLE="width: 684"]
<colgroup><col><col><col><col><col span="2"><col></colgroup><tbody>[TR]
[TD]ORDER[/TD]
[TD]FIRST[/TD]
[TD]SECOND[/TD]
[TD]THIRD[/TD]
[TD="colspan: 2"]SEARCH[/TD]
[TD]RESULTS[/TD]
[/TR]
[TR]
[TD="align: right"]3604955[/TD]
[TD]Media Pack XL[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD]Criteria 1[/TD]
[TD]chili[/TD]
[TD="align: right"]3604955[/TD]
[/TR]
[TR]
[TD="align: right"]3685809[/TD]
[TD]John Cooper Works Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Criteria 2[/TD]
[TD] [/TD]
[TD="align: right"]3685809[/TD]
[/TR]
[TR]
[TD="align: right"]3686844[/TD]
[TD]John Cooper Works Chili Pack[/TD]
[TD]Media Pack XL[/TD]
[TD] [/TD]
[TD]Criteria 3[/TD]
[TD] [/TD]
[TD="align: right"]3686844[/TD]
[/TR]
[TR]
[TD="align: right"]3725450[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3725450[/TD]
[/TR]
[TR]
[TD="align: right"]3727043[/TD]
[TD]John Cooper Works Chili Pack[/TD]
[TD]Media Pack XL[/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3727043[/TD]
[/TR]
[TR]
[TD="align: right"]3755662[/TD]
[TD]John Cooper Works Chili Pack[/TD]
[TD]Media Pack XL[/TD]
[TD]MINI Tech Pack[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3755662[/TD]
[/TR]
[TR]
[TD="align: right"]3725404[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3725404[/TD]
[/TR]
[TR]
[TD="align: right"]3738095[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3738095[/TD]
[/TR]
[TR]
[TD="align: right"]3761426[/TD]
[TD]MINI Sport Pack[/TD]
[TD]MINI JCW Sport Pack[/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3762543[/TD]
[/TR]
[TR]
[TD="align: right"]3762543[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3785108[/TD]
[/TR]
[TR]
[TD="align: right"]3767979[/TD]
[TD]Pepper Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]3773225[/TD]
[TD]Pepper Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]3785108[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
This fills down to give the results. With one criteria (chili, john, pepper etc.) it is showing the correct order numbers. The issue when I start free-typing into the second criteria box there are no results returned e.g if I type in 'XL' into cell F3 the results column goes blank when in fact I want it to show all order numbers that have the instances of 'chili' and 'xl' within them. I've have tried an AND statement but that doesn't seem to help because the cells may be blank that I am searching ... ?
Can anyone see where I am going wrong?
Thanks
I have an array formula that I am trying to use to find specific order numbers based on a free-text search across a three-column table. The formula I am using is:
=IFERROR(INDEX($A$2:$D$14, SMALL(IF(ISERROR(SEARCH($F$4,$B$2:$D$14)*SEARCH($F$3,$B$2:$D$14)*SEARCH($F$2,$B$2:$D$14)), "", ROW(A2:A14)-MIN(ROW(A2:A14))+1), ROW(A1)), COLUMN(A1)),"")
And the data is laid out like so:
[TABLE="width: 684"]
<colgroup><col><col><col><col><col span="2"><col></colgroup><tbody>[TR]
[TD]ORDER[/TD]
[TD]FIRST[/TD]
[TD]SECOND[/TD]
[TD]THIRD[/TD]
[TD="colspan: 2"]SEARCH[/TD]
[TD]RESULTS[/TD]
[/TR]
[TR]
[TD="align: right"]3604955[/TD]
[TD]Media Pack XL[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD]Criteria 1[/TD]
[TD]chili[/TD]
[TD="align: right"]3604955[/TD]
[/TR]
[TR]
[TD="align: right"]3685809[/TD]
[TD]John Cooper Works Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Criteria 2[/TD]
[TD] [/TD]
[TD="align: right"]3685809[/TD]
[/TR]
[TR]
[TD="align: right"]3686844[/TD]
[TD]John Cooper Works Chili Pack[/TD]
[TD]Media Pack XL[/TD]
[TD] [/TD]
[TD]Criteria 3[/TD]
[TD] [/TD]
[TD="align: right"]3686844[/TD]
[/TR]
[TR]
[TD="align: right"]3725450[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3725450[/TD]
[/TR]
[TR]
[TD="align: right"]3727043[/TD]
[TD]John Cooper Works Chili Pack[/TD]
[TD]Media Pack XL[/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3727043[/TD]
[/TR]
[TR]
[TD="align: right"]3755662[/TD]
[TD]John Cooper Works Chili Pack[/TD]
[TD]Media Pack XL[/TD]
[TD]MINI Tech Pack[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3755662[/TD]
[/TR]
[TR]
[TD="align: right"]3725404[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3725404[/TD]
[/TR]
[TR]
[TD="align: right"]3738095[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3738095[/TD]
[/TR]
[TR]
[TD="align: right"]3761426[/TD]
[TD]MINI Sport Pack[/TD]
[TD]MINI JCW Sport Pack[/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3762543[/TD]
[/TR]
[TR]
[TD="align: right"]3762543[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3785108[/TD]
[/TR]
[TR]
[TD="align: right"]3767979[/TD]
[TD]Pepper Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]3773225[/TD]
[TD]Pepper Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]3785108[/TD]
[TD]Chili Pack[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
This fills down to give the results. With one criteria (chili, john, pepper etc.) it is showing the correct order numbers. The issue when I start free-typing into the second criteria box there are no results returned e.g if I type in 'XL' into cell F3 the results column goes blank when in fact I want it to show all order numbers that have the instances of 'chili' and 'xl' within them. I've have tried an AND statement but that doesn't seem to help because the cells may be blank that I am searching ... ?
Can anyone see where I am going wrong?
Thanks