ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help eliminating a space in concatenate formula (https://www.excelbanter.com/excel-programming/330199-help-eliminating-space-concatenate-formula.html)

Bob Reynolds[_3_]

Help eliminating a space in concatenate formula
 
I have the following formula in a cell in Excel
=CONCATENATE(BC2," ",BN2," ",BB2,","," ",BO2,"")
The result would normally be Bob N. Reynolds
or Bob Reynolds

My question is how do I remove the extra space when there is no middle
initial in cell bb2 so it will read
Bob Reynolds with one space.

Thanks so muych
Bob



Norman Jones

Help eliminating a space in concatenate formula
 
Hi Bob,

Try:

= Trim(CONCATENATE(BC2," ",BN2," ",BB2,","," ",BO2,""))

---
Regards,
Norman



"Bob Reynolds" wrote in message
.. .
I have the following formula in a cell in Excel
=CONCATENATE(BC2," ",BN2," ",BB2,","," ",BO2,"")
The result would normally be Bob N. Reynolds
or Bob Reynolds

My question is how do I remove the extra space when there is no middle
initial in cell bb2 so it will read
Bob Reynolds with one space.

Thanks so muych
Bob





philcud

Help eliminating a space in concatenate formula
 
use an if statement to look at the cell containing the middle names, if
the cell is blank, then just concatenate forename and surname, else
concatenate forename middle name and surname.
if your data is set up with forename in BC, middlename in BN and
surname in BB, then formula would be
=IF(BN2="",CONCATENATE(BC2," "," ",BB2,",","
",BO2,""),CONCATENATE(BC2," ",BN2," ",BB2,","," ",BO2,""))

not sure if i have guessed your colums correctly, but i hope u get my
drift.

and now time to go home!!



All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com