Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Formatting Not Working Out
In a spreadsheet macro I'm building, I need to test the contents of one cell
for a value and if the value is true, set a background color for the active cell based on whether its value is equal to or greater than a calculated value derived from a value in another cell. I can't get this done, so far, with using Conditional Formatting. Here is a visual of what I'm trying to accomplish. A B C D 1Wks in Mo. 4.2 4.2 2Name Type June July 3Fred INT 124 133 4Kay EXT 155 170 In this example, if Fred has a type of "INT" in B3 then in cell D3 I want to first take the value of D1 x 30, which would equal 126. If Fred has a value in D3 of greater than or equal to 126, then I want to change the background color to Red. I have 13 cells on each row that I need to do this type of calculation for. I there is a per cell formula that I could use with Conditional Formatting, that would be great. If not, is there a way to do this with VBA? (I'm sure there is, but I don't have the bean for figuring it out!) I would really appreciate some help with this one. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Formatting Not Working Out
=AND($B3="INT",$D3=$D$1*30)
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Big Red" wrote in message ... In a spreadsheet macro I'm building, I need to test the contents of one cell for a value and if the value is true, set a background color for the active cell based on whether its value is equal to or greater than a calculated value derived from a value in another cell. I can't get this done, so far, with using Conditional Formatting. Here is a visual of what I'm trying to accomplish. A B C D 1Wks in Mo. 4.2 4.2 2Name Type June July 3Fred INT 124 133 4Kay EXT 155 170 In this example, if Fred has a type of "INT" in B3 then in cell D3 I want to first take the value of D1 x 30, which would equal 126. If Fred has a value in D3 of greater than or equal to 126, then I want to change the background color to Red. I have 13 cells on each row that I need to do this type of calculation for. I there is a per cell formula that I could use with Conditional Formatting, that would be great. If not, is there a way to do this with VBA? (I'm sure there is, but I don't have the bean for figuring it out!) I would really appreciate some help with this one. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Formatting Not Working Out
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Formatting Not Working Out
Thank you, Bob, this worked perfectly!
"Big Red" wrote: In a spreadsheet macro I'm building, I need to test the contents of one cell for a value and if the value is true, set a background color for the active cell based on whether its value is equal to or greater than a calculated value derived from a value in another cell. I can't get this done, so far, with using Conditional Formatting. Here is a visual of what I'm trying to accomplish. A B C D 1Wks in Mo. 4.2 4.2 2Name Type June July 3Fred INT 124 133 4Kay EXT 155 170 In this example, if Fred has a type of "INT" in B3 then in cell D3 I want to first take the value of D1 x 30, which would equal 126. If Fred has a value in D3 of greater than or equal to 126, then I want to change the background color to Red. I have 13 cells on each row that I need to do this type of calculation for. I there is a per cell formula that I could use with Conditional Formatting, that would be great. If not, is there a way to do this with VBA? (I'm sure there is, but I don't have the bean for figuring it out!) I would really appreciate some help with this one. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Not working: Conditional Formatting | Excel Discussion (Misc queries) | |||
Conditional Formatting - not working | Excel Discussion (Misc queries) | |||
Conditional Formatting ROW not working | Excel Discussion (Misc queries) | |||
Conditional Formatting not working | Excel Programming | |||
Conditional formatting not working! | Excel Programming |