Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

concatenate but skip blank cells 1

Status
Not open for further replies.

emzadi

IS-IT--Management
Feb 13, 2001
69
US
Hi, I need to join 4 columns into one and am using the formula:

=b2 & " " & c2 & " " & d2 & " " & e2

which does great, except for one thing. If one of those cells is blank, it leaves a space for the blank cell. What can I add to my formula to resolve this?

Thanks! Susan M. Wagner
LAPELS
susanw@lapels.com
 
=IF(B2<>&quot;&quot;,B2 & &quot; &quot;,&quot;&quot;) & IF(C2<>&quot;&quot;,C2& &quot; &quot;,&quot;&quot;) & IF(D2<>&quot;&quot;,D2 & &quot; &quot;,&quot;&quot;) & E2
 
I used the following formula, where cell c2 had no data, but there is no blank in the result field. Maybe I misunderstood the question?

=CONCATENATE(A2,B2,C2,D2,E2)


























confusedlady
 
ah, thanks DarkSun, had a brain block for a minute there! That's what I was trying to remember, duh... :) Susan M. Wagner
LAPELS
susanw@lapels.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top