View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Autofill data in a worksheet

try this
Sub alignrows()
mc = "a"
For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -2
'MsgBox Cells(i, mc)
Cells(i - 1, mc) = Cells(i - 1, mc) & " " & Cells(i, mc)
Rows(i).Delete
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Laptopguy" wrote in message
...
I have a text file that has data in it like this:
test1 math
john score 0 0 0 0
test2 english
mary scrore 10 15 20 30
test3 history
simon score 23 17 21 30
test4 trig
peter score 15 17 22 21

I would like to write a function that will align the test with the scores
so
it does not show on two lines. I would appreciate any assistance I can
get.