Concatenate multicoulmns but not display blank coulmns in the total formula

NGB82KS

Board Regular
Joined
Nov 7, 2019
Messages
82
Office Version
  1. 2016
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]SURNAME[/TD]
[TD]FIRSTNAME[/TD]
[TD]MI[/TD]
[TD]GENQUAL[/TD]
[TD]CONCAT'D[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]DOE[/TD]
[TD]JOHN[/TD]
[TD]T[/TD]
[TD]JR[/TD]
[TD]DOE.JOHN.T.JR[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]DOE[/TD]
[TD]JANE[/TD]
[TD][/TD]
[TD][/TD]
[TD]DOE.JANE[/TD]
[/TR]
</tbody>[/TABLE]

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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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,224,802
Messages
6,181,048
Members
453,014
Latest member
Chris258

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