Hi again people,
I've an odd question (again):
I'm trying to change the background colour of a cell if the cell is used in a formula on a different sheet.
My idea was to use the code below to change the cell colour when I clicked the cell:
BUT, it doesn't work when I'm selecting cells as a part of a simple =+sheet4!c3+sheet4!d4 etc function. Is there an easy fix?
Alt. my backup plan is to change the cell colour if it's used in a formula in a specific sheet, but searches for that doesn't get me close...
(My task is to link sub categories to categories, and I don't want to use a sub category twice. It's a lot of sub categories, so I'm trying to device myself a tool).
Thanks in advance.
I've an odd question (again):
I'm trying to change the background colour of a cell if the cell is used in a formula on a different sheet.
My idea was to use the code below to change the cell colour when I clicked the cell:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Selection.Interior.ColorIndex = xlNone Then
With Selection.Interior
.ColorIndex = 43
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Else
Selection.Interior.ColorIndex = xlNone
End If
End Sub
BUT, it doesn't work when I'm selecting cells as a part of a simple =+sheet4!c3+sheet4!d4 etc function. Is there an easy fix?
Alt. my backup plan is to change the cell colour if it's used in a formula in a specific sheet, but searches for that doesn't get me close...
(My task is to link sub categories to categories, and I don't want to use a sub category twice. It's a lot of sub categories, so I'm trying to device myself a tool).
Thanks in advance.