Conditional concatenate - if value in column cell, then add 3 columns to concate
ID: 638923 • Letter: C
Question
Conditional concatenate - if value in column cell, then add 3 columns to concatenate string.
I have a concatenate function the currently combines 19 columns together.
=CONCATENATE(L2, I2, M2, N2, O2, G2, P2, Q2, R2, E2, S2, B2, T2, C2, U2, D2, V2, H2, W2).
Is there a way to conditionally add 3 more columns if there is data in one of the 3 columns? Lets say... In col AA and AC there is always text. In AB, sometimes there is text. I would like to add AA2, AB2, AC2 to the concatenate when there is text in AB2.
=CONCATENATE(L2, I2, M2, N2, O2, G2, P2, Q2, R2, E2, S2, B2, T2, C2, U2, D2, V2, AA2, AB2, AC2, H2, W2).
If there is no text in AB, then AA2, AB2 and AC2 should not be used in the concatenate.
If there is another way to "concatenate" these columns together, that's ok too. I could re-order the columns if they would need to be in alpha order.
Hope this is doable.
Thanks for your help !!
Explanation / Answer
Hi..
You could use
=CONCATENATE(L2, I2, M2, N2, O2, G2, P2, Q2, R2, E2, S2, B2, T2, C2, U2, D2, V2) & IF(AB2="", "", CONCATENATE(AA2, AB2, AC2)) & CONCATENATE(H2, W2)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.