Index/Match with Multiple Criteria

chethead

New Member
Joined
Jul 23, 2015
Messages
45
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I'm really struggling with this one. I believe I need to use an index match lookup combo. The goal is to pull information from sheet 1 into other "forms" (pre-populated sheets) in a workbook. I would like to return all information from column C that has the correct text in columns A, B and D. I'm only looking to meet these three criteria: base bid, fire alarm and quoted:


<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
ABCD
1Base Bid
Nurse Call
Pull Cord

<tbody>
</tbody>
Quoted
2Base BidNurse Call
Dome Light

<tbody>
</tbody>
Quoted
3Base BidFire AlarmSmoke DetQuoted
4Base BidFire AlarmHeat DetQuoted
5Base BidFire AlarmPull StationQuoted
6Base BidSecurityDoor ContactQuoted

<tbody>
</tbody>


Sheet 2 I have labeled "Fire Alarm". So on sheet 2:

A1 would read "Smoke Det"
A2 would read "Heat Det"
A3 would read "Pull Station"

I would be very grateful for an answer!

Thank you
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
This is an array formula and must be entered with CTRL-SHIFT-ENTER.
Drag down as needed.

Excel Workbook
A
1Smoke Det
2Heat Det
3Pull Station
4
Sheet2
Excel Workbook
ABCD
1Base BidNurse CallPull CordQuoted
2Base BidNurse CallDome LightQuoted
3Base BidFire AlarmSmoke DetQuoted
4Base BidFire AlarmHeat DetQuoted
5Base BidFire AlarmPull StationQuoted
6Base BidSecurityDoor ContactQuoted
Sheet1
 
Upvote 0
Thank you very much! I've got it working pretty well. I'm trying to add one more argument. Column D on sheet 1 is either "Normal", "Quoted" or "Subcontractor". I would like to return column C on sheet 2 id column D is either "Quoted" or "Subcontractor", but not "Normal". I tried this:

{=IFERROR(INDEX(Estimate!$C$1:$C$2500,SMALL(IF(Estimate!$B$1:$B$2500<>"",IF(Estimate!$A$1:$A$2500=" || BASE BID",IF(OR(Estimate!$O$1:$O$2500="Quoted",Estimate!$O$1:$O$2500="Subcontractor"),IF(Estimate!$B$1:$B$2500=" || 2020 - FIRE ALARM SYSTEM",ROW(Estimate!$B$1:$B$2500)-ROW(Estimate!$B$1)+1)))),ROWS($A$1:A1))),"")}

I'm not familiar with the Small function so maybe that is where I am screwing things up
 
Upvote 0
The issue is with the OR function. It's only going to return TRUE or FALSE, but you need an array of TRUEs and FALSEs.
Try changing the formula to: (enter with CTRL-SHIFT-ENTER).

Code:
[TABLE="width: 1790"]
<colgroup><col width="1790"></colgroup><tbody>[TR]
   [TD="width: 1790"]=IFERROR(INDEX(Estimate!$C$1:$C$2500,SMALL(IF(Estimate!$B$1:$B$2500<>"",IF(Estimate!$A$1:$A$2500="   || BASE   BID",IF([COLOR=#ff0000](Estimate!$O$1:$O$2500="Quoted")+(Estimate!$O$1:$O$2500="Subcontractor")[/COLOR],IF(Estimate!$B$1:$B$2500="   || 2020 - FIRE ALARM   SYSTEM",ROW(Estimate!$B$1:$B$2500)-ROW(Estimate!$B$1)+1)))),ROWS($A$1:A1))),"")
[/TD]
 [/TR]
</tbody>[/TABLE]
 
Upvote 0
ISNUMBER/MATCH would be more flexible then + here...

{=IFERROR(INDEX(Estimate!$C$1:$C$2500,SMALL(IF(Estimate!$B$1:$B$2500<>"",IF(Estimate!$A$1:$A$2500=" || BASE BID",IF(ISNUMBER(MATCH(Estimate!$O$1:$O$2500,{"Quoted","Subcontractor"},0)),IF(Estimate!$B$1:$B$2500=" || 2020 - FIRE ALARM SYSTEM",ROW(Estimate!$B$1:$B$2500)-ROW(Estimate!$B$1)+1)))),ROWS($A$1:A1))),"")}
 
Upvote 0
Thank you to both of you! I appreciate the help. And thanks for exposing me to some new functions. Looking forward to tearing this apart to understand what I am doing
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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