View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Mallycat Mallycat is offline
external usenet poster
 
Posts: 1
Default Help on filling empty cells with string + row()


try this.

First select the range then run this macro

Sub copydown()
Dim myRange As Range
Set myRange = Selection
myText = ""
For Each cell In myRange
'set a new text value to use when it finds a non blank cell
If cell.Value < "" Then
myText = cell.Value
Else
cell.Value = myText & cell.Row
End If
Next cell
End Sub


--
Mallycat
------------------------------------------------------------------------
Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514
View this thread: http://www.excelforum.com/showthread...hreadid=561323