Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional formatting using VB
I am a very novice programmer...actually to be completely honest, I kno
absolutely nothing about programming VB in Excel. What I would like t do is write something that will help me do the following: If cell A2 is greater than 30 and cell B2 says "yes", then have cell B fill in red. I would like to do this throughout the spreadsheet until there are n more entries in either column, and I would like this to occu automatically (i.e., without having to hit a button). Thank you so much.. -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional formatting using VB
As I read your post, you don't need VBA to create the
conditional formatting (CF). Just use Excel's CF feature and use the "Formula Is" option. Suggested is the following: 1) First select all the desired cells in Column B. 2) Select Format|Conditional Formatting in the Worksheet Menu Bar. 3) Select the "Formul Is" option from the drop list. 4) Insert the fomula: =And(A1 30, B1 = "Yes") 5) Click the Format button. 6) Select the Patterns tab. 7) Click the red square in the colour palette. 8) Click OK. Note that when you select multiple cells and apply conditional formatting to the entire range then the formatting is applied relative to the first cell in the selection. In the case above, if Cell B2 says "Yes" and Cell A2 30 then B2 will be coloured red. And if Cell B3 says "Yes" and Cell A3 30 then B3 will be coloured red and so on. As I read your post this is what you wanted. Regards, Greg -----Original Message----- I am a very novice programmer...actually to be completely honest, I know absolutely nothing about programming VB in Excel. What I would like to do is write something that will help me do the following: If cell A2 is greater than 30 and cell B2 says "yes", then have cell B2 fill in red. I would like to do this throughout the spreadsheet until there are no more entries in either column, and I would like this to occur automatically (i.e., without having to hit a button). Thank you so much... --- Message posted from http://www.ExcelForum.com/ . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I convert conditional formatting into explicit formatting? | Excel Discussion (Misc queries) | |||
Formatting Conditional Formatting Icon Sets | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions |