Help with possible Index Match Match?

TheCrankyMule

New Member
Joined
Dec 20, 2018
Messages
2
Hi All,

This may be an impossible task so bear with me. I have the following raw data:
OwnerAccount IDIndustryIndustry#Account #
Joe1PlumberPrimary IndustryPrimary Account
Joe2HVACSecondary IndustrySecondary Account
Bob3PlumberPrimary IndustryPrimary Account
Bob4ElectricianSecondary IndustrySecondary Account
Bob5ConstructionTertiary IndustryTertiary Account

<tbody>
</tbody>

Then I need to append it to this table:
OwnerPrimary IndustrySecondary IndustryTertiary IndustryPrimary AccountSecondary AccountTertiary Account
Joe
Bob

<tbody>
</tbody>

So that it ends up looking like this:
OwnerPrimary IndustrySecondary IndustryTertiary IndustryPrimary AccountSecondary AccountTertiary Account
JoePlumberHVAC12
BobPlumberElectricianConstruction345

<tbody>
</tbody>

I was thinking I could use an index match match, but I'm not able to make it work. Anyone have any solutions? Maybe I need to rearrange the data? It's tough, because I'm writing SQL to pull the raw data the way it is, so I'm a bit limited in how I pull it. Thanks so much for your help.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi. Try:

=IFERROR(IF(ISNUMBER(SEARCH("industry",B$9)),INDEX($C$2:$C$6,MATCH(1,INDEX(($D$2:$D$6=B$9)*($A$2:$A$6=$A10),0),0)),INDEX($B$2:$B$6,MATCH(1,INDEX(($E$2:$E$6=B$9)*($A$2:$A$6=$A10),0),0))),"")
 
Upvote 0
Hi & welcome to MrExcel
How about

Excel 2013/2016
ABCDEFGHIJKLM
1OwnerAccount IDIndustryIndustry#Account #OwnerPrimary IndustrySecondary IndustryTertiary IndustryPrimary AccountSecondary AccountTertiary Account
2Joe1PlumberPrimary IndustryPrimary AccountJoePlumberHVAC12
3Joe2HVACSecondary IndustrySecondary AccountBobPlumberElectricianConstruction345
4Bob3PlumberPrimary IndustryPrimary Account
5Bob4ElectricianSecondary IndustrySecondary Account
6Bob5ConstructionTertiary IndustryTertiary Account
Sheet6
Cell Formulas
RangeFormula
H2{=IFERROR(INDEX($C$2:$C$6,MATCH(1,($A$2:$A$6=$G2)*($D$2:$D$6=H$1),0)),"")}
K2{=IFERROR(INDEX($B$2:$B$6,MATCH(1,($A$2:$A$6=$G2)*($E$2:$E$6=K$1),0)),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.

fill both formulae across & down
 
Upvote 0
Wow. Thanks for this. I've used many array formulas when doing Index Match with multiple criteria, but I've never seen id quite this way before. Would you possibly be able to explain exactly how the Match() funtion is working in this formula? Otherwise I would appreciate it if you could point me to a resource that could help. Thanks again!
 
Upvote 0
If we consider the formula in H2
this ($A$2:$A$6=$G2) will return either true or false depending on if the values in A2:A6 equal G2 ie
TRUE;TRUE;FALSE;FALSE;FALSE
this ($D$2:$D$6=H$1) will do the same for col D & H1
TRUE;FALSE;TRUE,FALSE,FALSE
the * symbol coerces them to 1 where both are TRUE & 0 for the rest giving
1;0;0;0;0
The MATCH then matches the first 1 it finds (in the case the first value in the array)
so the formula then returns the 1st value in col C.

Something I find useful is to use "Evaluate Formula" on the formula tab.

HTH
 
Upvote 0

Forum statistics

Threads
1,217,210
Messages
6,135,228
Members
449,920
Latest member
tayo4dslotdepositbca

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