View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tcgaines
 
Posts: n/a
Default If Cell Value < 0, Change Value to 0


Solution:

Sub LessThanZero()
Dim cell As Range
'Change the worksheet and column values to suit your needs.
For Each cell In Range("Sheet1!A:A")
If cell.Value < 0 Then
cell.Value = 0
End If
Next
End Sub


--
tcgaines
------------------------------------------------------------------------
tcgaines's Profile: http://www.excelforum.com/member.php...o&userid=29608
View this thread: http://www.excelforum.com/showthread...hreadid=496840