View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chris Bode via OfficeKB.com Chris Bode via OfficeKB.com is offline
external usenet poster
 
Posts: 47
Default Macro, how to set a cell value to zero

You can just use the
Worksheets("Sheet1").Cells(row,col).Value=0 statement to set the cell value
to zero.


#
Sub RoundToZero1()
For Counter = 1 To 12

Worksheets("Sheet1").Cells(Counter, 3).Value=0

Set curCell = Worksheets("Sheet1").Cells(Counter, 3)
If Abs(curCell.Value) < 0.5 Then Cells(Counter, 4) = "These numbers
are lass than 0.5"
Next Counter
End Sub
#


Hope this works

Have a nice time

Chris
------
Convert your Excel spreadsheet into an online calculator.
http://www.spreadsheetconverter.com

--
Message posted via http://www.officekb.com