Searching two columns based on a concatenated value of those columns and returning a corresponding value from a third column.

sonofthunder07

New Member
Joined
Jun 12, 2007
Messages
13
Hello,
I have three columns of data. I would like to concatenate the first two columns of each row and search that result based on a variable and then return the corresponding data from the third column for the row that matches the variable.
E.g. Values in the rows going down in column 1 are A, A, A, etc., values in the rows going down in column 2 are 1, 2, 3, etc., values in the rows going down in column 3 are 10, 20, 30, etc.. If my variable is "A2" the answer would be "20". I am looking for a single formula solution. Thanks for any help you could provide.
Regards,
Ken
 
Last edited:
sonofthunder07,


Excel Workbook
ABCDE
1Data set 1Datat set 2Data set 3Variable ListNeed formula to return values
2A110A660
3A220B11120
4A330C11130
5A440C16180
6A550
7A660
8B670
9B780
10B890
11B9100
12B10110
13B11120
14C11130
15C12140
16C13150
17C14160
18C15170
19C16180
20
ASAP Download





The formula in cell E2 copied down:

=INDEX($C$1:$C$100,MATCH((LEFT(D2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},D2&"1234567890")-1)))&"-"&MID(D2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},D2&"0123456789")),99),INDEX($A$1:$A100&"-"&$B$1:$B$100,0),0))
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Book1
*ABCDE
1A110*A2
2A220**
3A330**
4B140**
5B250**
6B360**
7C170**
8C280**
9C390**
Sheet1


Again, assuming the combination of lookup values is unique.

Array entered**:

=INDEX(C1:C9,MATCH(E1,A1:A9&B1:B9,0))

** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

Excellent! That did it. Elegant and simple solution. Thanks so much.
Ken
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,930
Members
452,367
Latest member
TePunaBloke

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