Converting numeric data in Spreadsheet to zero

  • Thread starter Thread starter deepakgoyal
  • Start date Start date
D

deepakgoyal

Hi

I am working on a excel spreadsheet. It contains text dat and numeric
data. what I am looking for is that I need to convert that numeric data
into 0. I mean there are cells which contains values like 234, 22, 12
etc and they blank cells in between them. So is there a way by writing
a command or Macro to convert that numeric data to 0, ie each field
must contain a value 0
..
Thank you very much in advance
Deepak
 
One more way:

Option Explicit
Sub testme()

On Error Resume Next
Worksheets("Sheet1").UsedRange _
.Cells.SpecialCells(xlCellTypeConstants, xlNumbers).Value = 0
On Error GoTo 0

End Sub

You may want to be more specific with the range, though. (Remember that Time
and Dates are just numbers to excel.)
 
Back
Top