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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eliminate space in formula result in Excel 4

Status
Not open for further replies.

johnbarr44

Technical User
Feb 27, 2009
29
NZ
I am using the formula format =D86&" "&E86 to merge two cells (Street Number and Street Name) into one address cell (Address 1) for a mail merge to create a list of names and addresses in Word from a spreadsheet.

If there is no street number, the result leaves a space where it would have been, which means that when I print these addresses the 'Address 1' line is not aligned with 'Name' above and 'Address 2' line below.

Is there an easy way to modify the formula to delete any spaces for an empty cell.

Thanks
John B
 


hi,
[tt]
=IF(TRIM(D86&" ")="","",D86&" ")&E86
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks heaps Skip,

Saved me a lot of frustration !

cheers
John B


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top