reverse lookup - multiple criteria - multiple results

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I want to do reverse lookup (multiple criteria - returning multiple results). In this case user will enter Address in H3 and dept in H4
then excel will return ph# in cell H6 and name in cell H7.

I highlighted cells H6 and H7 and then wrote the following formula in cell H6

=INDEX(A2:D15,MATCH(1,(H3=D2:D15)*(H4=C2:C15),0),{1,2})

ctrl+shift+enter

but I got "john1" in both cells!!

enter address - H31 main street
enter dept - H4it
ph# is - H6john1
name is - H7john1

<tbody>
</tbody>



nameph#deptaddress
john11it1 main street
john22hr2 main street
john33marketing3 main street
john44sales4 main street
john55admin5 main street
john66hr6 main street

<colgroup><col span="3"><col></colgroup><tbody>
</tbody>
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
The match function is returning the row when the address & department match which is what you want.
The last part of the index function is the column, you have {1,2}. Make it 1 in cell H6, and 2 in cell H7
 
Last edited:
Upvote 0
I highlighted cells H6 and H7 and then wrote the following formula in cell H6

=INDEX(A2:D15,MATCH(1,(H3=D2:D15)*(H4=C2:C15),0),{1,2})

ctrl+shift+enter

You are inserting the formula in a vertical range (H6:H7) so try

=INDEX(A2:D15,MATCH(1,(H3=D2:D15)*(H4=C2:C15),0),{1;2})
Ctrl+Shift+Enter

M.
 
Upvote 0
yes the ; fixed the issue. Thank you all very much.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,577
Members
449,039
Latest member
Arbind kumar

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