ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro Fill (https://www.excelbanter.com/excel-worksheet-functions/253846-macro-fill.html)

palups

Macro Fill
 
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!

Bob Bridges[_2_]

Macro Fill
 
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.

--- "palups" wrote:
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!


Jacob Skaria

Macro Fill
 
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).V alue = 0
On Error GoTo 0
End Sub

--
Jacob


"palups" wrote:

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!



All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com