ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replace blank cells with 0 (https://www.excelbanter.com/excel-programming/430024-re-replace-blank-cells-0-a.html)

Jim Thomlinson

Replace blank cells with 0
 
Are the cells truely empty or is it formulas that are retuning blank. If it
is truely blank then...

On Error Resume Next
Range("A1:Z1").SpecialCells(xlCellTypeBlanks).Valu e = 0
On Error GoTo 0
--
HTH...

Jim Thomlinson


"scrabtree23" wrote:

I need a code that will search a range (let's say A1:Z1) and will replace any
blank cells with a zero (0).



All times are GMT +1. The time now is 05:30 PM.

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