View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
keiji kounoike keiji kounoike is offline
external usenet poster
 
Posts: 199
Default Change all numbers to zero

I forgot about all th spreadsheets part. Try this modified one.

Sub allnum2zero()
Dim sh As Worksheet
On Error Resume Next
For Each sh In Worksheets
sh.Cells.SpecialCells(xlCellTypeConstants, xlNumbers) = 0
sh.Cells.SpecialCells(xlCellTypeFormulas, xlNumbers) = 0
Next
End Sub

keiji

keiji kounoike wrote:
Try this one

Sub allnum2zero()
On Error Resume Next
Cells.SpecialCells(xlCellTypeConstants, xlNumbers) = 0
Cells.SpecialCells(xlCellTypeFormulas, xlNumbers) = 0
End Sub

keiji

FrankM wrote:
OK, this request may seem a bit odd but please bear with me.

I have a couple dozen spreadsheets and I need to change all the
numbers on all the spreadsheets to zero.

Is it possible, with a Macro (or other means) to change all the
numbers on all the open spreadsheets to zero automatically vs manually.

Kindda a strange request, I know.