I need help with macro's

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need help with a macro that will get information from a specific sheet that
has multiple characters and dispurse those characters in differnt columns on
another sheet. for example sheet 1 column one would be 1840 blk bott to
sheet 2 row 1 1840 row 2 blk bott. thank you
 
Sub movesheet2()

Worksheets("sheet1").Activate
RowCount = 1
With Worksheets("sheet2")
Do While Cells(RowCount, "A") <> ""

Number = Val(Cells(RowCount, "A"))
Text = Cells(RowCount, "A")
Text = Trim(Mid(Text, InStr(Text, " ")))
.Cells(RowCount, "A") = Number
.Cells(RowCount, "B") = Text
RowCount = RowCount + 1
Loop
End With
End Sub
 
Thanks Joel.

Joel said:
Sub movesheet2()

Worksheets("sheet1").Activate
RowCount = 1
With Worksheets("sheet2")
Do While Cells(RowCount, "A") <> ""

Number = Val(Cells(RowCount, "A"))
Text = Cells(RowCount, "A")
Text = Trim(Mid(Text, InStr(Text, " ")))
.Cells(RowCount, "A") = Number
.Cells(RowCount, "B") = Text
RowCount = RowCount + 1
Loop
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top