Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Many Thanks Sue |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "Sue" wrote: 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 -- Many Thanks Sue |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. -- Many Thanks Sue "Bob Umlas, Excel MVP" wrote: 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 "Sue" wrote: 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 -- Many Thanks Sue |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Format Excel 2007 | Excel Discussion (Misc queries) | |||
Conditional number format in Excel 2007 | Excel Discussion (Misc queries) | |||
Conditional Format - Excel 2007 | Excel Discussion (Misc queries) | |||
Excel 2007 Conditional Format with Formula | Excel Discussion (Misc queries) | |||
Conditional format oddity in Excel 2007 | Excel Worksheet Functions |