Compare 3 columns, match rows based on other 2 colums

Dustinkli

Board Regular
Joined
Mar 26, 2019
Messages
62
Office Version
  1. 365
  2. 2011
Platform
  1. Windows
I have a formula that looks at a cell in a column and then cross references another column and then pulls the value of the cell to the right of that 3rd column. However, I would like it to search based on if a value exists in that column anywhere in the cell rather than requiring the entire cell to match.

Example:

NameAge LookupNameAge
BobJohn
22​
JohnTina
31​
TinaClaudia
51​
AlbertBob
34​
ClaudiaAlbert
63​

The formula I have I would put in the age lookup column and would be: =INDEX($D$2:$D$10000,MATCH(A2,$C$2:$C$10000,0))
that would return 34.

However, what I am trying to do is set it so that it doesn't require the entire cell to look it up. For instance if it is like this:

NameAge LookupNameAge
BobJohn22 years
JohnTina
31​
TinaClaudia51 years
AlbertBob34 years old
ClaudiaAlbertage 63

I want the formula to be able to look at the "Age" column and pull the match if it exists ANYWHERE in the cell so it should do the lookup regardless.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I'm not sure what you are after as your description makes no sense.
You are comparing col A with col C & returning what is in col D, therefore it makes no difference if col D is 34, 34 Years old, nearly 34.
 
Upvote 0
I'm not sure what you are after as your description makes no sense.
You are comparing col A with col C & returning what is in col D, therefore it makes no difference if col D is 34, 34 Years old, nearly 34.

My fault. I made a mistake in the way I set it up. It would be like this:


NameAge Lookup (formula goes in this column)NameAge
Bob34John Test22
John22Tina Tester31
Tina31Claudia Lname51
Albert63Bob Smith34
Claudia51Albert Johnson63
 
Upvote 0
In that case try
Excel Formula:
=INDEX($D$2:$D$10000,MATCH(A2&"*",$C$2:$C$10000,0))
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,580
Members
449,174
Latest member
chandan4057

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