1 match in multiple columns

orion23

New Member
Joined
Jul 9, 2014
Messages
22
Office Version
  1. 365
Good morning All,

I need help with a formula to match a unique value.

Excel book has 2 sheets
Sheet1 and Sheet 2
Sheet1 has the unique value I need to match
Sheet 2 has 3 columns with possible matches (D,E,F)
The resulting value should be a static column in sheet2, let's say column "H"

How can this be done?

Thank you in advance for your support
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
will sheet 2 have the same value multiple times

say sheet 1 has name fred

will fred appear once in columns D,E,F - or many times
if many times - what maybe in column H - all the same or different results

this was the sort of thing i was thinking about


on the same sheet not different sheets - but same sort of idea
 
Upvote 0
Thank you for taking the time to reply

The value should only appear once in the multiple columns

The result is also unique in column H

Search for A2 (sheet1)
in sheet2, columns D, E, and F
result should be from sheet2, column H (static)
 
Last edited:
Upvote 0
so that link should do it for you

but what version of Excel do you have - may need a later version, I'm using 365 version

I just need to check what versions those functions came in
mmult is quite old MMULT function - Microsoft Support
transpose is also old TRANSPOSE function - Microsoft Support

it is an array so depending on version you may need control+shift+enter and get {} around formula

here is a mockup

lookup grid -ETAF.xlsx
AB
1
2fredsheet2-h5
3johnsheet2-h7
41sheet2-h4
52sheet2-h3
63sheet2-h9
Sheet1
Cell Formulas
RangeFormula
B2:B6B2=INDEX(Sheet2!$H$2:$H$10,MATCH(1,MMULT(--(Sheet2!$D$2:$F$10=Sheet1!A2),TRANSPOSE(COLUMN(Sheet2!$D$2:$F$10)^0)),0))


lookup grid -ETAF.xlsx
ABCDEFGHIJKL
1check
2sheet2-h2fredsheet2-h5
32sheet2-h3johnsheet2-h7
41sheet2-h41sheet2-h4
5fredsheet2-h52sheet2-h3
6sheet2-h63sheet2-h9
7johnsheet2-h7
8sheet2-h8
93sheet2-h9
10harrysheet2-h10
11
Sheet2


I have but on dropbox, BUT will only be on for a few days - then I delete

 
Last edited:
Upvote 0
Thank you again..
Great, your formula works!!!!!!!!!!! Thank you
Unfortunately I thought that the value in D, E, F wouldn't repeat, but it does repeat at times
Changing the "Match(1" to Match (2 and to Match(3 helps to match the results by running the formula multiple times.

Is there a workaround?
 
Upvote 0
whats in column H - are they different ?
how will excel know which ones to return
otherwise - if H is the same for all the entries , then it doesnt matter

what version of excel ?
 
Upvote 0
Microsoft® Excel® for Microsoft 365 MSO (Version 2301 Build 16.0.16026.20002) 64-bit

Column H has unique values that don't repeat

Values in D, E & F will only repeat within the same row

and my apologies for providing incomplete information
 
Upvote 0
IGNORE ---- I see what you mean now

so it does not matter if they repeat in the same row - as it will bring back H for that row anyway

I may be missing something, otherwise you would not have come back , but not sure what.....

so may need a small sample with expected results

also it would be worth updating your profile , to show the excel version - will help a lot for any future questions knowing the version as loads of new functions in 365
 
Upvote 0
really messy - sure there is a way , will need to look into further
BUt off the top of my head

BUT
=IFERROR(INDEX(Sheet2!$H$2:$H$10,MATCH(1,MMULT(--(Sheet2!$D$2:$F$10=Sheet1!A2),TRANSPOSE(COLUMN(Sheet2!$D$2:$F$10)^0)),0)),IFERROR(INDEX(Sheet2!$H$2:$H$10,MATCH(2,MMULT(--(Sheet2!$D$2:$F$10=Sheet1!A2),TRANSPOSE(COLUMN(Sheet2!$D$2:$F$10)^0)),0)),INDEX(Sheet2!$H$2:$H$10,MATCH(3,MMULT(--(Sheet2!$D$2:$F$10=Sheet1!A2),TRANSPOSE(COLUMN(Sheet2!$D$2:$F$10)^0)),0))))

 
Upvote 0
Solution
Perfect, no need to look further.
Your initial approach was great, but this is even better
Thank you for going out of your way to help
Have a great week ahead!
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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