Conditional Concatenation

RBusiness

Board Regular
Joined
Sep 18, 2010
Messages
187
Hey folks,

I'm trying to make a conditional concatenation but am scratching my head on how to do it. Maybe you can help?

Basically, I need a concatenation that I can drag in Column E that looks for the value in column A, then, scans the column for an instance of the same value where there's alphanumeric characters/ has a value two columns over C1) and then a and then concatenates the value in where C1 appends D2, then D3, then D4 in the cell where the formula is.

The goal is to only concatenate when the values in A match and then combine C of the matching row with the content(s) of D in the same row.
I'm trying to NOT "Salty Cars" (D2 and C2) if that makes sense.

I know someone has the wizardry to do this one - but I just don't know how. What do you think?


ABCDE
P VALUES VALUETextTextConcatenation
1​
111​
Cars
2​
111​
113​
SmallSmall Car
3​
111​
114​
MediumMedium Car
4​
111​
115​
BigBig Car
5​
222​
*******s
6​
222​
223​
SaltySalty *******s
7​
222​
224​
PlainPlain *******s
8​
222​
225​
MoldyMoldy *******s
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
If the column C values always occur above the column D values, then you could do this:

ABCDE
1111Car 
2111113SmallSmall Car
3111114MediumMedium Car
4111115BigBig Car
5111116 Car
6222Chips 
7222223SaltySalty Chips
8222224PlainPlain Chips
9222225MoldyMoldy Chips
10333334?Good 
11333335BadBad ?
12333333Example
Sheet1
Cell Formulas
RangeFormula
E1:E11E1=IF(C1="",D1&" "&VLOOKUP(A1,A$1:C$12,3,),"")

The cells highlighted are where the data is not well-behaved. If this is a possibility, we could build in some additional checks, depending on what you wanted the output to be.
 
Upvote 0

Forum statistics

Threads
1,215,072
Messages
6,122,966
Members
449,094
Latest member
Anshu121

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