I want to select a range in a worksheet (B6:AZ1000 should cover all the ranges in any worksheet) and if there's a number in the cell, change it to zero. There are no formulas, text, etc; the cell will either be blank or have a number, but I want to keep the blank cells blank. This is in order to convert existing worksheets into templates.
I can do this manually by copying a cell with a zero, selecting the entire worksheet or range, then use PasteSpecial Values. But how can I do this in code? And can I make this code a part of Excel rather than having to put it into every worksheet? Thanks.




Reply With Quote