Hi there,
I'm new to VBA and to be honest it scares me!
Basically I have a number of columns that need conditional formatting with more than the easy peasy three conditions.
Example 1
If CellValue >20 Cell needs to be filled Red (Colour Index 3)
If CellValue <-20 Cell needs to be filled Red (Colour Index 3)
If CellValue >10 Cell needs to be filled Light Orange (Colour Index 45)
If CellValue <-10 Cell needs to be filled Light Orange (Colour Index 45)
If CellValue <10 Cell needs to be filled Lime (Colour Index 43)
If CellValue >-10 Cell needs to be filled Lime (Colour Index 43)
If Cell is blank then there needs to be no fill.
Example 2
If CellValue >0.2 Cell needs to be filled Red (Colour Index 3)
If CellValue >0.1 Cell needs to be filled Light Orange (Colour Index 45)
If CellValue <0.1 Cell needs to be filled Lime (Colour Index 43)
If Cell is blank then there needs to be no fill.
The values in the cells (range = H2:H101 for Example 1 and P2:P101 for Example 2 are calculated by a formula or brought back using a VLOOKUP and are liable to change when data in the spreadsheet is refreshed.
I was using the nice and simple conditional formatting for Example 2 but I found that blank cells were being formatted to a Red fill!
Can anybody help me with some coding and save me from tearing any more of my hair out?!
Thank you!!!
I'm new to VBA and to be honest it scares me!
Basically I have a number of columns that need conditional formatting with more than the easy peasy three conditions.
Example 1
If CellValue >20 Cell needs to be filled Red (Colour Index 3)
If CellValue <-20 Cell needs to be filled Red (Colour Index 3)
If CellValue >10 Cell needs to be filled Light Orange (Colour Index 45)
If CellValue <-10 Cell needs to be filled Light Orange (Colour Index 45)
If CellValue <10 Cell needs to be filled Lime (Colour Index 43)
If CellValue >-10 Cell needs to be filled Lime (Colour Index 43)
If Cell is blank then there needs to be no fill.
Example 2
If CellValue >0.2 Cell needs to be filled Red (Colour Index 3)
If CellValue >0.1 Cell needs to be filled Light Orange (Colour Index 45)
If CellValue <0.1 Cell needs to be filled Lime (Colour Index 43)
If Cell is blank then there needs to be no fill.
The values in the cells (range = H2:H101 for Example 1 and P2:P101 for Example 2 are calculated by a formula or brought back using a VLOOKUP and are liable to change when data in the spreadsheet is refreshed.
I was using the nice and simple conditional formatting for Example 2 but I found that blank cells were being formatted to a Red fill!
Can anybody help me with some coding and save me from tearing any more of my hair out?!
Thank you!!!