Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Currently I have a conditional format statement which uses select in
order to complete the cell CF. The problem I have is that I have another macro which runs automatically when Sheet1 is opened, thus in the below, I get an error b/c the macro on Sheet1 runs. Is there a way to CF without using .Select? -------------------------------------- Sheets("Sheet1").Select Sheets("Sheet1").Cells(TemporaryRow + (RowTest - 1), ItemColumn + 2).Select Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, Formula1:=XStanleyVariance + 0.008 Selection.FormatConditions(1).Font.ColorIndex = 3 Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, Formula1:=XStanleyVariance - 0.008 Selection.FormatConditions(2).Interior.ColorIndex = 33 Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, Formula1:=XStanleyVariance - 0.008, Formula2:=XStanleyVariance + 0.008 Selection.FormatConditions(3).Interior.ColorIndex = xlNone Selection.FormatConditions(3).Font.ColorIndex = xlAutomatic Sheets("X").Select -------------------------------------- I tried the following, but it didn't work for some reason. Sheets("Sheet1").Cells(TemporaryRow + (RowTest - 1), ItemColumn + 2).FormatConditions.Delete Sheets("Sheet1").Cells(TemporaryRow + (RowTest - 1), ItemColumn + 2).FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, Formula1:=XStanleyVariance + 0.008 Sheets("Sheet1").Cells(TemporaryRow + (RowTest - 1), ItemColumn + 2).FormatConditions(1).Font.ColorIndex = 3 Sheets("Sheet1").Cells(TemporaryRow + (RowTest - 1), ItemColumn + 2).FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, Formula1:=XStanleyVariance - 0.008 Sheets("Sheet1").Cells(TemporaryRow + (RowTest - 1), ItemColumn + 2).FormatConditions(2).Interior.ColorIndex = 33 Sheets("Sheet1").Cells(TemporaryRow + (RowTest - 1), ItemColumn + 2).FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, Formula1:=XStanleyVariance - 0.008, Formula2:=XStanleyVariance + 0.008 Sheets("Sheet1").Cells(TemporaryRow + (RowTest - 1), ItemColumn + 2).FormatConditions(3).Interior.ColorIndex = xlNone Sheets("Sheet1").Cells(TemporaryRow + (RowTest - 1), ItemColumn + 2).FormatConditions(3).Font.ColorIndex = xlAutomatic Any help appreciated, thankx. -np |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
New Conditional Format Overriding Previous Conditional Format | Excel Discussion (Misc queries) | |||
Conditional Formatting - Can I select a select with Conditional Formatting? | Excel Worksheet Functions | |||
can not select conditional formatting | Excel Worksheet Functions | |||
Select Case Conditional Formatting Sub? | Excel Discussion (Misc queries) | |||
When I select "format cells", the format dialog box does not disp. | Excel Worksheet Functions |