By selecting a cell - change color in a range
I am trying to change the color in a range of cells that is triggered
by selecting a separate cell. Example-- select A1 and the range d5:f10 changes to green. Select another cell - A2 and the previous selection goes back to its original color and the range associated with A2 is then changed to green. Etc.... This would be similar to A1 being a button, but there will be data entered into A1. Any advice??? |
By selecting a cell - change color in a range
You can right click the sheet tabview codeleft window select worksheetright window use _selectionchangewrite your code Give more examples such as always 3 rows more than the selection and always cof d:f, etc and it could be pretty simple to code -- Don Guillett SalesAid Software "hampster" wrote in message oups.com... I am trying to change the color in a range of cells that is triggered by selecting a separate cell. Example-- select A1 and the range d5:f10 changes to green. Select another cell - A2 and the previous selection goes back to its original color and the range associated with A2 is then changed to green. Etc.... This would be similar to A1 being a button, but there will be data entered into A1. Any advice??? |
By selecting a cell - change color in a range
There is not a set formula such as always 3 rows more than the
selection. Each cell is assigned a range of cells. There are many in the worksheet. Here are a few actual assignments. A1 - O2:Q4, A2 - O5:Q6, B2 - R2:T4. In other words, each reference cell refers to a block of 9 cells. Each cell already contains conditional formatting. I need some code that recognizes that cell A1 (or other cell) has been clicked on and then based on which cell is clicked, color a corresponding range of nine cells and then change back when another is clicked. A1 (or other cell) may be empty or have data in it. On Apr 30, 10:55 am, "Don Guillett" wrote: You can right click the sheet tabview codeleft window select worksheetright window use _selectionchangewrite your code Give more examples such as always 3 rows more than the selection and always cof d:f, etc and it could be pretty simple to code -- Don Guillett SalesAid Software "hampster" wrote in message oups.com... I am trying to change the color in a range of cells that is triggered by selecting a separate cell. Example-- select A1 and the range d5:f10 changes to green. Select another cell - A2 and the previous selection goes back to its original color and the range associated with A2 is then changed to green. Etc.... This would be similar to A1 being a button, but there will be data entered into A1. Any advice???- Hide quoted text - - Show quoted text - |
By selecting a cell - change color in a range
Excellent!!!
Exactly what I was after. Thank you. |
By selecting a cell - change color in a range
Glad it helped. The trick is to not destroy the other formatting.
-- Don Guillett SalesAid Software "hampster" wrote in message ups.com... Excellent!!! Exactly what I was after. Thank you. |
All times are GMT +1. The time now is 01:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com