View Single Post
 
Old 06-27-2011, 11:06 AM
OTPM OTPM is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Apr 2011
Location: West Midlands
Posts: 981
OTPM is on a distinguished road
Default

Hi
Paste this code into a module in your workbook. It will deal with 1000 rows in Column A of your worksheet.
Let me know if you need to cover more columns.

Sub CellCheckForBlank()
'
' Check for Blank Cells and populate with value above
'
For Count = 1 To 1000
myVal = Range("A" & Count)
Range("A" & Count + 1).Select
If Range("A" & Count + 1) = "" Then
Range("A" & Count + 1) = myVal
End If
Next Count
End Sub


Tony (OTPM)
Reply With Quote