Concatenate multicoulmns but not display blank coulmns in the total formula

NGB82KS

Board Regular
Joined
Nov 7, 2019
Messages
82
Office Version
  1. 2016
BCDEF
1SURNAMEFIRSTNAMEMIGENQUALCONCAT'D
2DOEJOHNTJRDOE.JOHN.T.JR
3DOEJANEDOE.JANE

<tbody>
</tbody>

I cant figure out how to write a formula to concatenate column B thru Column E, add a period after each column, but not display a period if the field is blank. In the example, row 2 shows the full display with a "." after each and row 3 displays jane but no "." after because the other fields are blank.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try
Code:
E2=A2&"."&B2&IF(C2<>"","."&C2,"")&IF(D2<>"","."&D2,"")
 
Last edited:
Upvote 0
It returned a "FALSE" in the Column.
so it should be checking to see if Column "D2" has text, if it does it adds the "." and the text of D2 and repeats on "E2" with the same process. If one field is blank it moves to the next so if they have no MI in Column "D" but a generation qualifier of "Jr" it would add 1 "." and the "JR" from that field.

=CONCATENATE(F2=B2&"."&B2&IF(C2<>"","."&C2,"")&IF(D2<>"","."&D2,""))
 
Upvote 0
What version of Xl are you using?
 
Upvote 0
No
Just put the formula as it is
=A2&"."&B2&IF(C2<>"","."&C2,"")&IF(D2<>"","."&D2,"")
 
Upvote 0
That's a shame, if you had 2019 or 365 I'd suggest
=TEXTJOIN(".",1,A1:D1)

As it is, mohadin's formula should work, as long as both Col A & B always have text.
 
Upvote 0
You are very well come and thank you for the feedback
Be happy
 
Upvote 0

Forum statistics

Threads
1,214,548
Messages
6,120,141
Members
448,948
Latest member
spamiki

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