Concatenation problem

  • Thread starter Thread starter Charles W Davis
  • Start date Start date
C

Charles W Davis

I have a big table preparing for a community telephone directory with these
entries:

=(CONCATENATE(N6377,", ",L6377," ",M6377," & ",O6377," ",P6377," ",Q6377))
L M N O P Q Result
Thomas C Zwart Donna M Zwart Zwart, Thomas C & Donna M
Zwart
Lou E Zwick Zwick, Lou E &
Morton Zwick Marla Izaks Zwick, Morton & Marla
Izaks
Saul Zwirn Zwirn, Saul
&

Two questions,
1. Line one, how do I eliminate the second occurence of the Surname "Zwart"?
2. Line two, how do I eliminate the "&"?
 
You don't need to use CONCATENATE (which I hate as a function), you can
concatenate text together directly using ampersands (&) to link the text.
This also allows you to have more complicated constructions (as in the
formula that follows). Try out this formula....

=IF(L5="","",N5&", "&L5&IF(M5="",""," ")&M5&IF(O5="",""," &
"&O5&IF(P5="",""," ")&P5&IF(Q5=N5,""," "&Q5)))

which also cleans up the extra blank spaces you had when no middle initial
existed and allows you to copy it down through cells that have no names in
them (nothing is displayed rather than the commas and ampersand your formula
was showing). By the way, for ease of testing, I created the formula from
Row 5... change the 5's to what ever row you want to start using the formula
on and then copy it down as far as you want to.

Rick
 
Rick,

It worked great! I've been trying to use a similar deal on the phone
numbers.
The phone numbers below were given to me as 7025691231, blank, 8145555555,
7025211231, blank, 2131231233. I now have them in three columns as shown
under C, D, & E.

C D E Result
569 1231 569-1231

814 555 5555 (814) 555-5555
521 1231 521-1231

213 123 1233 (213) 123-1233

All of this for volunteer work...

Thanks again!
 
Back
Top