![]() |
Coloring Active Cell
Hello,
Is there a function I could use with Conditional Formatting that would allow me to color a cell if it was the active cell? I know I could probably do this in VBA, but I would be interested in a method that used Condtional Formatting. Thanks, Carroll Rinehart |
Don't think possible but right click sheet tabview codeinsert thisSAVE If you want to keep the highlighting for past selections delete the cells line Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = 0 Target.Interior.ColorIndex = 6 End Sub -- Don Guillett SalesAid Software "Carroll" wrote in message oups.com... Hello, Is there a function I could use with Conditional Formatting that would allow me to color a cell if it was the active cell? I know I could probably do this in VBA, but I would be interested in a method that used Condtional Formatting. Thanks, Carroll Rinehart |
Thanks Don. I was interested in returning the previously active cell
to its original state. One reason I was interested in sticking to strictly conditional code was that I have other conditional formatting already in place, and I have read that the VBA approach wipes out whatever conditional formatting you have in place. Carroll |
Don,
After some testing with the VBA code you provided, I notice that my underlying conditional formatting did actually stay intact. However what was weird was that all cells that I had colored previously all turned white as soon as I move just one cell over. I like your code and will keep it for another situation, but does anyone know how to do this with conditional formatting? I did look at the cell function, but I didn't see how I could use that with conditional formatting to color the active cell. Thanks, Carroll |
Don,
I agree that if I comment out the cells line in the VBA that it will not remove the coloring from cells that I purposefully had already colored, but then I end up with a trail of yellow wherever my cursor goes. Your code is great where you have a sheet with cells all the same color. Thanks, Carroll |
What is it that you really want to do?? Be VERY clear
-- Don Guillett SalesAid Software "Carroll" wrote in message oups.com... Don, I agree that if I comment out the cells line in the VBA that it will not remove the coloring from cells that I purposefully had already colored, but then I end up with a trail of yellow wherever my cursor goes. Your code is great where you have a sheet with cells all the same color. Thanks, Carroll |
You could change it to a doubleclick or right clickevent instead
-- Don Guillett SalesAid Software "Carroll" wrote in message oups.com... Don, I agree that if I comment out the cells line in the VBA that it will not remove the coloring from cells that I purposefully had already colored, but then I end up with a trail of yellow wherever my cursor goes. Your code is great where you have a sheet with cells all the same color. Thanks, Carroll |
Thanks.
|
All times are GMT +1. The time now is 02:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com