Thread: ADDRESS MACRO
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default ADDRESS MACRO

Try this:

Sub spread_um()
n = Cells(Rows.Count, "A").End(xlUp).Row
j = 2
k = 1
For i = 1 To n
Cells(k, j).Value = Cells(i, 1).Value
j = j + 1
If Cells(i, 1).Value = "" Then
j = 2
k = k + 1
End If
Next
End Sub

--
Gary''s Student - gsnu200771


"JOSEPH WEBER" wrote:

i have a list of data. all the info is in column a. some info has three
lines some four, some may have more. i need a macro of some sort that would
take all of the data and put it into separate colums. an example is this:

name of company
23 Gates Ave
somewhere, ny 11522
516-xxx-xxxx
accounting

Ruthizer Scott Cpa
30 Gates Ave
somewhere, ny 11552
212-xxx-xxxx


NEEDS TO LOOK LIKE THIS

name of company 23 Gates Ave somewhere, ny 11522 516-xxx-xxxx
Ruthizer Scott Cpa 30 Gates Ave somewhere, ny 11552 212-xxx-xxxx


OBVIOUSLY WITH THE LAST COLUMN IN THERE AS WELL. CITY STATE AND ZIP CAN BE
ALL IN ONE COLUMN. PLEASE HELP