Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If Cell Value < 0, Change Value to 0
The subject says it all. I want to search a range for cell values that are < 0 and if they are, change the value to 0. how do i do that? thx -- tcgaines ------------------------------------------------------------------------ tcgaines's Profile: http://www.excelforum.com/member.php...o&userid=29608 View this thread: http://www.excelforum.com/showthread...hreadid=496840 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If Cell Value < 0, Change Value to 0
Hi,
You can write an IF formula like =IF(A1<0,0,A1) and copy it across the range. Regards Govind. tcgaines wrote: The subject says it all. I want to search a range for cell values that are < 0 and if they are, change the value to 0. how do i do that? thx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I Need a formula to evaluate a cell with + or - values | Excel Worksheet Functions | |||
cell color change based on due date | New Users to Excel | |||
Cell Change Color - Need Help | New Users to Excel | |||
background color of my cell does not change | Excel Discussion (Misc queries) | |||
Look for change next blank cell in Range | Excel Worksheet Functions |