LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Conditional formatting with vba

I am a relative newbie at VBA and need some help with this one.
I have developed a sheet where I want to conditionally format the font
colour in cells in a row if the cell contents equals the contents in
column a.

I also need it to not change if the cell value is one of two values in
cell a of the row and finally if the values in the row do not equal the
value in column a then format the font in a different colour.

I have rows from 3 to 210 however I am not able to specify how many
columns need to be checked as that will vary.

EG

Column A Column B Column c ...

1 Apples Bananas(red font) Apples(blue font) Pears(red font)
apples(blue font)
2 Peaches Peaches(blue font) Apples(red font) Pears (red font) Peaches
(blue font)
3 TBP(No font change)
4 Bye(No font change)
..
..
210

I am trying to get it to work as a worksheet change event,however keep
getting nowhere. Can anyone help.

My thoughts were along the lines of

For x = 3 to 210
Select Case
Case TBP
if A(x) = "TBP"
No font change

Case Bye
If A(x) = "Bye"
No font change

Case CellEqual
If B(x).End(xlRight) = A(x)
Change font colour to blue

Case cellnotequal
If B(x).End(xlRight) < A(x)
Change font colour to red

Next x

Can anyone help me to achieve this?
 
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
Convert Conditional Formatting to Conventional Formatting [email protected] Excel Programming 0 October 11th 10 05:09 PM
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 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 03:06 PM.

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

About Us

"It's about Microsoft Excel"