Conditional Format Excel 2007

  • Thread starter Thread starter Sue
  • Start date Start date
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
 
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
 
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.
 

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

Back
Top