I'm attempting to create a macro that copies a string over a float/integer in the next few cells until it hits another string. I've found some code that I thought would work and would like help modifying it (or if I should go in a different direction, tell me):
Sub ReplaceNumberswithText()
' Performs Do loop, testing at top of loop.
' Loops until empty cell is reached.
' Note that you can also use a Do While Not IsEmpty(ActiveCell) loop.
' Test contents of active cell; if active cell is empty, exit loop.
Do Until IsEmpty(ActiveCell)
If ActiveCell.Text Then Text.Copy
End If
' Copies cell contents.
' Step down 1 row to the next cell.
ActiveCell.Offset(1, 0).Select
Selection.Paste
Else: If ActiveCell.Value = 0 Then ActiveCell.Offset(1, 0).Select
End If
' Return to top of loop.
Loop
End Sub
I need to copy each string over the following floats/integers, until the next string. Then repeat until the end of the column (column A).
http://www.flickr.com/photos/hillsindustries/12198631954/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…