Converting numeric data in Spreadsheet to zero

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
 
D

Dave Peterson

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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top