Select blank cell

  • Thread starter Thread starter Hodar
  • Start date Start date
H

Hodar

Im a newbee in VBA, and I have a simple problem.

How can I select a blank cell in a given range and relpace it with a
value from another cell.

Any quick VBA programmers out there?
 
Dim rng as Range
On Error Resume Next
set rng = Range("A1:A10").specialCells(xlBlanks)
On Error goto 0
if not rng is nothing then
rng(1).Value = "rng(1).offset(-1,0)
End if
 
I am trying to do something very similar. Is it possible to modify th
coding here and allow every blank cell within a column to copy th
value of the cell immediately before it. For instance, a blank in cel
B10 copies B9, blank cell B37 copies B36, etc.
Thanks for the help.
Gi
 
Back
Top