vba rows to columns for addresses

Cathmac801

New Member
Joined
Apr 23, 2014
Messages
20
Hi all

I have addresses in col A as follows

Person 1
Address line 1
Address line 2
City
Country
BLANK ROW
Person 2
Address line 1
Address line 2
Addres line 3
City
Country
BLANK ROW

etc

How do I get them to show up as
Person 1 Address line1 Address line 2 City Country
Person 2 Address line 1 Address line 2 Address line 3 City Country

Each person has numerous lines but each complete address has a blank row between it and the next address

thanks a mil
Cath
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
hey.
i've been working on this. :)

writes concatenated values of cells to column C in the same sheet.

Code:
Sub mrxl_854289_multiCell_to_singleCell()

    Dim ar As Range
    Dim i As Long
    
    With Worksheets("Sheet1") 'change worksheet name to suit
        For Each ar In .Columns(1).SpecialCells(xlCellTypeConstants, 23).Areas
            i = i + 1
            .Range("C" & i) = Join(Application.Transpose(Range(ar.Address).Value), " ")
        Next
    End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,768
Messages
6,126,783
Members
449,336
Latest member
p17tootie

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top