Hi Everyone,
I have a macro-enabled worksheet in which I have used "=OR(CELL("col")=COLUMN(),CELL("row")=ROW())" in the Conditional Formating tool to highlight the row and column whenever a cell is selected in columns B:I and I have the below given VBA code applied...
.....................
.......................
My problem is that following the above-given code if events happen in columns "B : I" there is a transpose procedure happening in columns BA and FA.
Right now what is happening is whenever the transpose procedure takes place the highlighting flickers up and down (the Application.ScreenUpdating is set to False so it does not flicker between columns) and is very irritating
Is it possible to make it so that the highlighting does not change if I select a column outside range B:I?
Meaning if I have selected cell C10, row B10 to I10 and Column C will be highlighted and if I select cell L5 or any other cell outside of columns B:I, highlighting of row B10 to I10 and Column C should not change till I make a selection in range B:I.
It will be very helpful if this can be done.
Thanks everyone.
I have a macro-enabled worksheet in which I have used "=OR(CELL("col")=COLUMN(),CELL("row")=ROW())" in the Conditional Formating tool to highlight the row and column whenever a cell is selected in columns B:I and I have the below given VBA code applied...
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
r = ActiveCell.Row
c = ActiveCell.Column
If c > 9 Then
Application.ScreenUpdating = True
Exit Sub
End If
If Application.CutCopyMode = False Then
Application.Calculate
End If
.......................
My problem is that following the above-given code if events happen in columns "B : I" there is a transpose procedure happening in columns BA and FA.
Right now what is happening is whenever the transpose procedure takes place the highlighting flickers up and down (the Application.ScreenUpdating is set to False so it does not flicker between columns) and is very irritating
Is it possible to make it so that the highlighting does not change if I select a column outside range B:I?
Meaning if I have selected cell C10, row B10 to I10 and Column C will be highlighted and if I select cell L5 or any other cell outside of columns B:I, highlighting of row B10 to I10 and Column C should not change till I make a selection in range B:I.
It will be very helpful if this can be done.
Thanks everyone.
Last edited by a moderator: