column format

noob

Board Regular
Joined
Mar 5, 2008
Messages
59
I have a list of addresses A1 contains Name A2 address and street A3 CityA4 state and zip. Starts at A1 and ends at A1218. Is there a automated process that will combine the 4 cells in to B1 for all 1218 cells ?

A
1 Bob A
2 111 central ave
3 chicago
4 IL 60616
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Yes. Here is one example:

=A1 & " " & A2 & " " & A3 & " " & A4

The & is telling Excel, use this cell

Having the " " in the formula creates a space between all of the data

Hope that helps!
 
Upvote 0
I've used that but the only problem i have with that is that B2 will display A2:A4 i would need B2:B4 to be blank.
 
Upvote 0
A
1 Bob A
2 111 central ave
3 chicago
4 IL 60616

Returns this: Bob A 111 Central Ave Chicago IL 60616

Code:
Sub Address()
Dim lrow As Long
Dim r As Long

lrow = Range("A" & Rows.Count).End(xlUp).Row

For i = 1 To lrow Step 4

Range("B" & i).FormulaR1C1 = "=CONCATENATE(RC[-1],"" "",R[1]C[-1],"" "",R[2]C[-1],"" "",R[3]C[-1])"

Next i

For i = lrow To 1 Step -1
    If Range("B" & i).Value = "" Then
        Range("B" & i).Delete Shift:=xlUp
    End If
Next i

End Sub
let me know if you need anything else
 
Last edited:
Upvote 0
Try

Code:
Sub ATest()
Dim LR As Long, i As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR - 3 Step 4
    Range("B" & Rows.Count).End(xlUp).Offset(1).Value = Join(Application.Transpose(Range("A" & i).Resize(4)), Chr(10))
Next i
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,172
Members
452,893
Latest member
denay

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