The mouse cursor and a cell border cursor are showcased in the image below.
This is the sample dataset.
Method 1 – Change the Cursor Color of Selected Cells Using VBA
- Go to Developer ➤ Visual Basic to open the VBA Editor or press ALT + F11.
- Double-click the sheet name.
- Select Worksheet from the drop-down menu.
By selecting Worksheet the following two lines of code are generated.
Private Sub Worksheet_SelectionChange(ByVal mrTarget As Range)
End Sub
- Enter the following between the two generated lines.
Cells.Borders.ColorIndex = xlNone
Target.Borders.Color = vbRed
In this VBA code, “mrTarget.Borders.Color = vbRed” changes the selected cells’ cursor color from black to Red. You can choose other colors.
- Save the code.
Select a range of cells in your Excel sheet. The color of the active cells’ border changed from Black to Red.
2. Advanced Options to Change the Cursor Color of Active/Inactive Cell
- Go to the File menu.
- Select Options.
- Select Advanced.
- Go to ‘Display option for this worksheet’.
- Check ‘Show gridlines’.
- In ‘Gridline Color’, choose a color. Orange, here.
- Click OK.
The color of the gridlines changed to orange.
Download Practice Workbook
You can download the Excel file from the following link and practice.
Related Articles
- How to Move Cursor in Excel Cell
- Excel Cursor Movement: Logical vs Visual
- How to Highlight with Cursor in Excel
- [Fixed!] Excel Cursor Locked in Select Mode
- [Fixed!] Excel Cursor Stuck on White Cross
<< Go Back to Cursor in Excel | Excel Parts | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!