Customizing the Active Cursor Cell

btkoenig7

New Member
Joined
Jul 12, 2018
Messages
1
Thank you in advance. I am trying to help someone in my office who does a lot of manual data entry in excel. She is looking for a way to customize her excel so that her active cell is a difference color than the rest of the spreadsheet. Is there a way this can be done? We currently have Microsoft Office 365 Business.

Example: We would like the cursor button (typically just a black/green outline of the cell) to have a yellow fill color.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Try this:-
NB:- This code should change the selected cell colour to "Yellow", then change it back to previous colour when new cells is selected.

Code:
Option Explicit
Dim Rng As Range, col As Long
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Count = 1 Then
        If Not Rng Is Nothing Then Rng.Interior.Color = col
        Set Rng = Target
        col = Rng.Interior.Color
        Rng.Interior.Color = vbYellow
    End If
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

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