Return multiple values in a row using Hlookup or Index(Match)

AlejandroD

New Member
Joined
Apr 22, 2019
Messages
2
Hi Everyone,
I am trying to figure out how to write an Hlookup or an Index(Match) formula that shows multiple results. I want to search multiple values horizontally instead of vertically. Please see below as an example:


Criteria:

SCANNERID_1SCANNERID_2SCANNERID_3SCANNERID_4 CheckinID
ND200_ISNDSP2PSNHBG308ND2_2ASND200_IS
NDNR
NDSP1PSND100_ISNHBG308ND2_2ASND100_IS
NCI711ISNHBG308ND2_2ASND200_ISND200_IS
NHBG308NDSP1PSND100_ISND2_2ASND100_IS
ND150_ISNDSP1PSNHBG308ND2_2AS
NCI711ISND700_ISNDSP3PSNT4ASND700_IS

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

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

Desired result:
I would like to add a formula on column E (CheckinID) that finds the values ND100_IS, ND200_IS, ND700_IS on each row. If the value is not found then the cell should be blank.

Hope it makes sense, thanks in advanced for your help.

 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi & welcome to MrExcel.
How about
=IFERROR(INDEX(A2:D2,MATCH("ND100_IS",A2:D2,0)),IFERROR(INDEX(A2:D2,MATCH("ND200_IS",A2:D2,0)),IFERROR(INDEX(A2:D2,MATCH("ND700_IS",A2:D2,0)),"")))
 
Upvote 0
Try
E2=IF(ISERROR(MATCH("ND100_IS",A2:D2,0)),IF(ISERROR(MATCH("ND200_IS",A2:D2,0)),IF(ISERROR(MATCH("ND700_IS",A2:D2,0)),"","ND700_IS"),"ND200_IS"),"ND100_IS")
 
Upvote 0
Maybe...


A
B
C
D
E
F
G
1
SCANNERID_1​
SCANNERID_2​
SCANNERID_3​
SCANNERID_4​
CheckinID​
List​
2
ND200_IS​
NDSP2PS​
NHBG308​
ND2_2AS​
ND200_IS​
ND100_IS​
3
NDNR​
ND200_IS​
4
NDSP1PS​
ND100_IS​
NHBG308​
ND2_2AS​
ND100_IS​
ND700_IS​
5
NCI711IS​
NHBG308​
ND2_2AS​
ND200_IS​
ND200_IS​
6
NHBG308​
NDSP1PS​
ND100_IS​
ND2_2AS​
ND100_IS​
7
ND150_IS​
NDSP1PS​
NHBG308​
ND2_2AS​
8
NCI711IS​
ND700_IS​
NDSP3PS​
NT4AS​
ND700_IS​

List in G2:G4

Formula in E2 copied down
=IFERROR(LOOKUP(9.99E+307,MATCH(G$2:G$4,A2:E2,0),G$2:G$4),"")

M.
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,263
Messages
6,123,958
Members
449,135
Latest member
jcschafer209

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