Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formating and Macros | Excel Discussion (Misc queries) | |||
Conditional Replace without macros | Excel Worksheet Functions | |||
Conditional hide rows macros | Excel Programming | |||
Conditional Macros | Excel Programming | |||
Conditional Macros | Excel Programming |