PC Review


Reply
Thread Tools Rate Thread

How to code macro for worksheet?

 
 
Eric
Guest
Posts: n/a
 
      16th Feb 2009
Does anyone have any suggesitons on how to code macro for worksheet?

Condition 1:
In cell A1, there is a number 1234, under the range between cell B2 to Z50,
if any cell matches the number 1234 in cell A1, then it's background color
should change to red and it's text color should change to white.
Condition 2:
In cell A2, there is a number 2345, under the range between cell B2 to Z50,
if any cell matches the number 2345 in cell A2, then it's background color
should change to blue and it's text color should change to white.

Condition 3:
In cell A3, ....
....

Condition 10:
In cell A10, ....
There is a priority for a list conditions,
If condition 2,3,5,6,8,10 are false, condition 1,4,7,9 are true, only change
the color for condition 1.
If condition 1,2,3,5,6,8,10 are false, condition 4,7,9 are true, only change
the color for condition 4.

I cannot use Excel build-in function to change the background and text
color, because it is limited to 3 different conditions only, but I get 10
conditions.
Does anyone have any suggestions on how to code macro for worksheet to
change the background and text color?
Thanks in advance for any suggestions
Eric
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to code macro for worksheet? Eric Microsoft Excel Programming 4 17th Feb 2009 02:15 AM
How to code macro for worksheet? Eric Microsoft Excel Worksheet Functions 1 12th Feb 2009 06:14 AM
How to code macro for worksheet? Eric Microsoft Excel Programming 0 12th Feb 2009 05:19 AM
Is this when it's appropriate to put the macro in the worksheet's code area? nj Microsoft Excel Programming 4 20th Mar 2007 02:27 PM
macro to alter worksheet code =?Utf-8?B?Y3d3b2xmZG9n?= Microsoft Excel Programming 1 31st Mar 2005 03:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:13 AM.