Conditional Formatting on Cursor position

hsk

Well-known Member
Joined
Oct 19, 2006
Messages
567
I was searching for coditional formatting on cursor position,

e.g. I want to paint the cell C10 in yellow if cursor is on cell say A8

Thanks to this forum again .... i found one solution

Insert - Name - mycell - Refers to -
=AND(GET.CELL(2)=8,GET.CELL(3)=1)=TRUE

Select Cell C10 - Conditional Formatting - Formula is =mycell - format ....

Now when ever my cursor is on A8 , Cell C10 turns yellow ....

And that's what i am looking for ......

But to make this work i have do

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = True
End Sub


I have not understood this part ... what actually this macro is doing ......
Can i make this work w/o macro .....

??
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi hsk

The event procedure is forcing a refresh, forcing thus the evaluation of the conditional formatting condition. Without the event procedure, changing cells will not trigger recalculation since you are just navigating.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,454
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top