Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I convert conditional formatting into explicit formatting? Patrick Harris Excel Discussion (Misc queries) 0 April 9th 09 12:00 AM
Formatting Conditional Formatting Icon Sets The Rook[_2_] Excel Discussion (Misc queries) 3 March 7th 09 08:48 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 08:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"