I have a tool that identifies some cells in a worksheet. It makes that visual by 'marking' cells in the sheets. As the sheet uses conditional formatting to auto highlight even and odd rows (by changing their background color), it seems that I can't mark my cells by setting a different background color as the conditional format overrides that.
I'm thinking there's no other way here (unless I can somehow augment the conditional formatting formula to NOT apply if I mark that cell). Changing background color would be the best (read: most visible) mark method I think.
So my alternative is to place a thick colored border around my cells as a mark. That works.
But now I want to add code that "unmarks" my marked cells... I an make the colors disappear by setting the Borders(...).ColorIndex property to XLAutomatic.
I thought I could also re-set the thickness from xlThick to xlHairline but then I realized that my entire range has Thick outside borders and I also use these for the header row (meaning that some cells do not have all Hairline borders). Now, I can probably work out if the cel is to the edge of the range and accommodate for that, but that seems overly complex.
So does anyone have other solutions and/or suggestions for marking and unmarking cells in my example?
Mark and Un-mark as cell
-
- BronzeLounger
- Posts: 1385
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
-
- BronzeLounger
- Posts: 1385
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
Re: Mark and Un-mark as cell
I thought some more and maybe I can add cell-notes ('comments') to the marked cells. I can use that comment to further clarify why the cell was marked and add a code which could indicate what cell borders were thick vs. hairline before I marked the cell (e.g. 1000 for left border thick and rest hairline).