Hi

I have data in an excel worksheet returned from a dbf database via MSQuery which contains addresses. For example;

Column A: Company Name
Column B: Add1
Column C: Add2
Column D: Add3
Column E: Town
Column F: Zip Code

I want to combine/merge the cells into a single cell placing a carriage return between each address line and remove any blank cells. For example;

Company Name
Add1
Town
Zip Code

Add2, Add3 are removed because they contain no data. In the next record they may contain data in which case they would appear in the merged cell.

I can merge the cells and insert carriage returns using CHAR(10) but I cannot work out how to remove the blank cells so that the address appears as contiguous in the merged cell. Can anyone help?

Thanks