Help Needed in Using Index Array w/2 Search Criteria in Excel

cliff.sizemore

New Member
Joined
Mar 5, 2012
Messages
4
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
I am attempting to use Excel to search through several hundred thousand records and return a unique identifier based on two user defined inputs. <o:p></o:p>
<o:p></o:p>
I have succesfully used an Index Array formula in order to search these records to return the unique identifier based on ONE user input but my syntax breaks down when I attempt to incorporate a SECOND criteria into the Index Array. <o:p></o:p>


excelarrayscreenshot.png



In the example above, I'm trying to write the formula in cell K8 that would allow the two user inputs in cells L3 and L4 to be used to search the range A2:F17 and return the corresponding Comp ID's (this is the unique idenitfier that I need) from Column B.<o:p></o:p>
<o:p></o:p>
Any suggestions on structuring a formula to help me get the desired results would be GREATLY APPRECIATED. Thanks in advance.<o:p></o:p>
<o:p></o:p>
FYI<o:p></o:p>
<o:p></o:p>
I'm using Excel 2010 running on Windows XP<o:p></o:p>
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Try
=INDEX($B$2:$B$17, MATCH(L2&L3, $A$2:A$A$17&$F$2:$F$17, 0))

Confirmed with CTRL+SHIFT+ENTER rather than just with Enter.

Regards
Adam
 
Upvote 0
Try
=INDEX($B$2:$B$17, MATCH(L2&L3, $A$2:A$A$17&$F$2:$F$17, 0))

Confirmed with CTRL+SHIFT+ENTER rather than just with Enter.

Regards
Adam
Hi Adam,

Thanks for the quick response to my post. I applied the formula suggested but it unfortunately only returned the first Comp ID from Column B that met the User Entered criteria (the 899655 from cell B9).

How do we modify the formula to include ALL comp ID's in column B that meet both search criteria? In my example screenshot, the formula should also return the comp ID's in cells B12 & B13, for a grand total of 3 matches to the search criteria.

Thanks again.
 
Upvote 0
Hmmm. My formula is only good if there's only one option per combination. Sorry I didn't spot that. I can't help but I suffer little doubt someone smarter than me will stop by shortly.

Regards
Adam
 
Upvote 0
Not a problem- its the second search criteria my boss asked me to include that blew up my very amateur efforts as well. I was feeling good after solving the single criteria search on my own and then he knocked me down a few notches by putting in the second. :)

I do appreciate the effort to help however, thanks!
 
Upvote 0
K8, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(INDEX($B$2:$B$17,
  SMALL(IF($A$2:A$A$17&"|"&$F$2:$F$17=$L2&"|"&$L3,
   ROW($B$2:$B$17)-ROW($B$2)+1),ROWS($K$8:K8))),"")
 
Upvote 0
i dunno if this will helps since we need to create another column for index criteria, master excelsior Aladin Akyurek already posted along time ago
Book1
ABCDEFGHIJK
1storeCompIDCompNameCompBrandAddressZipsearchcriteria
21041ajaj10store104
31042bibi10zip10
41043chch11
51124dgdg10searchresults(compid'sbystore&zip)
61125efef10storezip
71126fefe11110110
81237gdgd10210210
91238hchc10310310
102009ibib11 1010
1120010jaja10 1010
12
Sheet1
 
Upvote 0
using master excelsior Aladin Akyurek, awesome formula d(^_^)b
Index Array w/2 Search Criteria.xlsx
ABCDEFGHI
1storeCompIDCompNameCompBrandAddressZipsearchcriteria
21041ajaj10store104
31042bibi10zip10
41043chch11
51124dgdg10searchresults(compid'sbystore&zip)
61125efef101
71126fefe112
81237gdgd10 
91238hchc10 
102009ibib11 
1120010jaja10 
Sheet2
 
Upvote 0
Thanks to everyone who replied- I've used your suggestions and got the search function working.

Your help is TRULY appreciated!!!!
 
Upvote 0

Forum statistics

Threads
1,215,639
Messages
6,125,971
Members
449,276
Latest member
surendra75

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