Uncel_Dolan
03-29-2016, 03:44 PM
Hey everyone,
I got the task to re-organize an address file. Here's what I want to do:
15772
I hope the blackout doesn't bother you. So I need the Name, StreetAddress, City and Zip to be reorganized and, most importantly, be in Rows adjacent to each other. Here's what I have so far:
Sub AddressBook()
For i = 1 To 2033 Step 4
Name = ActiveSheet.Range("A" & i).Value
Address = ActiveSheet.Range("A" & i + 1).Value
City = ActiveSheet.Range("A" & i + 2).Value
Zip = ActiveSheet.Range("B" & i + 2).Value
ActiveSheet.Range("D" & i).Value = Name
ActiveSheet.Range("E" & i).Value = Address
ActiveSheet.Range("F" & i).Value = City
ActiveSheet.Range("G" & i).Value = Zip
Next i
End Sub
This DOES grab all the data from Cloumn A, but I don't know how to arrange the data. The code, as is, just spills it out every fourth row.
I hope you can help me!
Thanks
Uncel_Dolan
I got the task to re-organize an address file. Here's what I want to do:
15772
I hope the blackout doesn't bother you. So I need the Name, StreetAddress, City and Zip to be reorganized and, most importantly, be in Rows adjacent to each other. Here's what I have so far:
Sub AddressBook()
For i = 1 To 2033 Step 4
Name = ActiveSheet.Range("A" & i).Value
Address = ActiveSheet.Range("A" & i + 1).Value
City = ActiveSheet.Range("A" & i + 2).Value
Zip = ActiveSheet.Range("B" & i + 2).Value
ActiveSheet.Range("D" & i).Value = Name
ActiveSheet.Range("E" & i).Value = Address
ActiveSheet.Range("F" & i).Value = City
ActiveSheet.Range("G" & i).Value = Zip
Next i
End Sub
This DOES grab all the data from Cloumn A, but I don't know how to arrange the data. The code, as is, just spills it out every fourth row.
I hope you can help me!
Thanks
Uncel_Dolan