Macro Fill

  • Thread starter Thread starter palups
  • Start date Start date
P

palups

Hello there im looking for a macro or formula that will fill all empty cell
from A1 to A1020 with "0" without affecting the blank cell properties i.e.
colors, sizes, etc. Thank you!
 
Me again, palups. This is a question for the Excel Programming forum; this
one's dedicated to worksheet functions. If you've never written a macro
before and you'd rather learn how to program in VBA than just have the code
handed to you, drop me a line via email and I'll tutor you a little.
 
The below will fill the blank cells in range A1:A1020 if they are truly
blank..and within the cells are within the used range.

Sub Macro1()
On Error Resume Next
Range("A1:A1020").SpecialCells(xlCellTypeBlanks).Value = 0
On Error GoTo 0
End Sub
 
Back
Top