SuperFantastic
New Member
- Joined
- Sep 18, 2019
- Messages
- 2
Hey everyone, here's what I'm trying to do. Whenever a cell in row 5 is selected, highlight the column in a specified range. I've used conditional formatting based on a formula, =COLUMN()=CELL("col"), and the following VBA code:
This highlights the correct cells, but it does so when any cell is selected on the sheet. I'd like to highlight the column, only when a cell in row 5 is selected.
Thanks!
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.CutCopyMode = False Then
Application.Calculate
End If
End Sub
This highlights the correct cells, but it does so when any cell is selected on the sheet. I'd like to highlight the column, only when a cell in row 5 is selected.
Thanks!