View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
David Prout[_2_] David Prout[_2_] is offline
external usenet poster
 
Posts: 2
Default Help with randomn blank cell in my data

Run this Macro but save your data first to make sure it does what you want

Sub EvaluateRange()
LastCell = Range("B65536").End(xlUp).Offset(-1, 0).Address
Set MyRange = Range("B1", LastCell)
For Each MyCell In MyRange
If MyCell.Value = "" Then
MyCell.Value = MyCell.Offset(0, -1).Value
End If
Next MyCell

End Sub


DavidP


On Tue, 13 Apr 2004 08:53:19 -0500, Jayhawktc wrote:

I am needing to evaluate a column of data and if a cell in that column
is blank I need to fill that cell with what is in the preceeding column
but if there is a value in the cell just skip over it and move to the
next cell. Any help to get me going would be greatly appreciated.
Thanks in advance.


---
Message posted from http://www.ExcelForum.com/