LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 209
Default Need help with Macro's and Shading

Madhart wrote:
Sorry If I'm posting in the wrong place.

I'm trying to set up some shading macro's or rules for an excel page (excel
2003) and running into a little difficulty. I set up a macro to put in a
light shading to make everything easy on the eyes every even number row:
Range( _
"A8:S8,[through],A94:S94" _
).Select
With Selection.Interior
.ColorIndex = 24
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("G4:M4").Select
End Sub
I also created one to remove the shading.

however, I also have a macro to add a mandatory and needed shading of:
With Selection.Interior
.ColorIndex = 2
.Pattern = xlLightUp
.PatternColorIndex = xlAutomatic
End With
End Sub
This shading will be in random cells and change day by day but needs to stay.

My question is: Is there any way to create an exception so that if there
are any cells that have the .ColorIndex = 2/.Pattern = xlLightUp shading in
them then the other shadings/or removal won't overwrite them but instead
leave them and continue filling in the rest of the cells?

Thanks :)


Not sure if this will help or not but I've found this freebie very
helpful. One of the functions it has it to shade every nth line.

http://www.asap-utilities.com/

Standard disclaimer: not associated with or receive money from yada yada

gls858
 
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
Macro's 148steve Excel Discussion (Misc queries) 4 November 14th 06 09:39 PM
Conditional Cell Shading (based on the shading of other cells) Tubby Excel Worksheet Functions 2 June 20th 06 10:03 PM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
shading a rowwhen a time is entered but no shading when 0 is enter fomula problems Excel Worksheet Functions 7 October 23rd 05 08:44 PM
Macro's that do more Luke Excel Discussion (Misc queries) 1 June 8th 05 04:41 PM


All times are GMT +1. The time now is 04:05 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"