index match ?

deviation

Board Regular
Joined
Dec 17, 2004
Messages
171
I have search the board, but when you don't know exactly what you are searching for, it's really hard to find it :)


Currently I have an index match statement that works well... but now I need something similar to an index match that matches two items then returns a value from a cell in the same row

Sheet 1

ID Name Getinfo1 Getinfo2
1 person1
2 person2


Sheet2
ID Name code info1
1 Person1 bbb 200
3 person3 aaa 125
1 person1 aaa 326
2 person2 aaa 589
5 person5 aaa 56
2 person2 bbb 567
5 person5 bbb 125
4 person4 aaa 894


in Getinfo1 column I need to match a person by ID and by code 'aaa', if matches return value in info1 on sheet two

in Getinfo2 Column I need to match a person by ID and code 'bbb', if matches return value in info1 on sheet two

this is not identical to the setup I have but the setup is actually too large to reflect here... Sheet two is random with no particular sorting as is sheet 1.

thanks in advance for looking at this..
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Concatenated multikey approach...

Sheet2
Book3
ABCDE
1IDNamecodeinfo1Concat
21Person1bbb2001#Person1#bbb
33person3aaa1253#person3#aaa
41person1aaa3261#person1#aaa
52person2aaa5892#person2#aaa
65person5aaa565#person5#aaa
72person2bbb5672#person2#bbb
85person5bbb1255#person5#bbb
94person4aaa8944#person4#aaa
10
Sheet2


E2, copied down:

=A2&"#"&B2&"#"&C2

Sheet1
Book3
ABCD
1IDNameaaabbb
21person1326200
32person2589567
Sheet1


C2, copied across then down:

=INDEX(Sheet2!$D$2:$D$9,MATCH($A2&"#"&$B2&"#"&C$1,Sheet2!$E$2:$E$9,0))
 
Upvote 0

Forum statistics

Threads
1,215,039
Messages
6,122,799
Members
449,095
Latest member
m_smith_solihull

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