Help cleaning up formula that concatinates two cell values based on a partial string match

HackSlash

Active Member
Joined
Nov 18, 2016
Messages
361
I'm not very confident with formulas. I made something really ugly and then thought "There must be a better way".

I will first tell you what I want:

I need to search for a partial string match on a cell in a known range on a different sheet. Once the match is found I need to take the cell value from below it (Row+1) and concatenate with the value of the cell below and to the right (Row+1, Col+1).

What I did:
I ended up searching for it twice using INDEX, MATCH and the "&" operator to join their values.

Can I do this with one search instead of repeating myself for the second column?

Code:
=INDEX(temp.txt!$A$1:$J$22,MATCH("*| P*",temp.txt!$E$1:$E$18,0)+1,5)&INDEX(temp.txt!$A$1:$J$22,MATCH("*| P*",temp.txt!$E$1:$E$18,0)+1,6)

Is there an easier way? Shorter? More elegant?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,214,834
Messages
6,121,871
Members
449,054
Latest member
juliecooper255

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