Conditional Format Excel 2007

S

Sue

Hi All

This will be an easy one for you experts I need help with a macro
to solve the following

Range N3:N200 if any cell in the range has a value of either 40 or 80
then in the Range O3:O200 the cells will have a value of 0(zero) formatted
as 0.00 - Do not need any cell or text colours.

I would put a command button on the sheet and assign the macro
 
B

Bob Umlas, Excel MVP

Sub Answer()
For each oCell in range("N3:N200")
If oCell.Value = 40 or oCell.Value = 80 then
oCell.Offset(0,1).value = 0
oCell.Offset(0,1).NumberFormat = "0.00"
End If
Next
End Sub
 
S

Sue

Hi Bob

Just checked my mail and cut & pasted your reply into the sheet - worked
first time spot on your help is very much appreciated.
 
Top