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 macros

I have a worksheet that I need to run a macro on where, if certain
cells are blank, then I want to color them yellow. They all start out
pink (required input). I want to then run the macro again and if any
of the yellow cells has then had input put in, then it needs to be
changed back to pink, and any pink cells that no longer have data in
them, need to be turned to yellow.

Any clues?

Crystal
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default conditional macros

Use conditional formatting to make it automatic
formatconditional formatgo from there

"Crystal" wrote in message
m...
I have a worksheet that I need to run a macro on where, if certain
cells are blank, then I want to color them yellow. They all start out
pink (required input). I want to then run the macro again and if any
of the yellow cells has then had input put in, then it needs to be
changed back to pink, and any pink cells that no longer have data in
them, need to be turned to yellow.

Any clues?

Crystal



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default conditional macros

Unfortunately, there are more than 3 conditions, and it needs to be a
macro. We've now, also, run into the problem of validation within that
macro, and also validating numbers from other worksheets.

I'm just looking for some snippits of code, so that I can work from
there

Crystal Owings


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default conditional macros

Sub chgcolor()

For Each c In [a1:c6]
If Len(c) 0 Then c.Interior.ColorIndex = 6
If Len(c) = 0 Then c.Interior.ColorIndex = 7
Next
End SubOK. Will this help?

"Crystal" wrote in message
m...
I have a worksheet that I need to run a macro on where, if certain
cells are blank, then I want to color them yellow. They all start out
pink (required input). I want to then run the macro again and if any
of the yellow cells has then had input put in, then it needs to be
changed back to pink, and any pink cells that no longer have data in
them, need to be turned to yellow.

Any clues?

Crystal



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default conditional macros

David McRitchie shows how to have more than three conditions.

http://www.mvps.org/dmcritchie/excel/event.htm#case

If you're unfamiliar with using code,

http://www.mvps.org/dmcritchie/excel/getstarted.htm

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------On
Unfortunately, there are more than 3 conditions, and it needs to be a
macro. We've now, also, run into the problem of validation within that
macro, and also validating numbers from other worksheets.

I'm just looking for some snippits of code, so that I can work from
there

Crystal Owings


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
Conditional Formating and Macros Les Excel Discussion (Misc queries) 0 February 18th 10 08:20 PM
Conditional Replace without macros Craig Excel Worksheet Functions 2 May 20th 09 11:34 PM
Conditional hide rows macros Stu[_4_] Excel Programming 1 September 25th 03 10:05 PM
Conditional Macros Tom Ogilvy Excel Programming 0 September 10th 03 05:39 PM
Conditional Macros Don Guillett[_4_] Excel Programming 0 September 10th 03 04:39 PM


All times are GMT +1. The time now is 05:10 PM.

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"