Skip to main content

How to change border color of active cell in Excel?

Author: Sun Last Modified: 2020-06-03
doc change border color 1
In Excel, the border color of active cell or range are different from others as below screenshot shown. But in some times, you want to change the border color of the active cell for more outstanding from others. In this article, I will give you some tricks on changing border of the active cells for making it differ from others in Excel.
Change border color of active cell with VBA
Outstanding active cell with Kutools for Excel good idea3

To change the filled color of active cell is a good choice to make it outstanding, but there is no built-in function to help you except macro code.

1. Press Alt + F11 keys to open Microsoft Visual Basic for Applications window.

2. Double click at the sheet you want to use the code in the Project Explore pane, and paste below code to the Module script.

VBA: Change background color of active cell

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.Borders.ColorIndex = xlNone
    Target.Borders.Color = vbRed
End Sub

doc change border color 2

3. Save the code, and now when you select a range, the range’s border color will be change to red. See screenshot:
doc change border color 3

Tip: it will remove all border format of the sheet if you apply this macro code.

If you have Kutools for Excel installed, you can enable its Reading Layout to across highlight the active cell for sticking out.

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After free installing Kutools for Excel, please do as below:

Click Kutools > Reading Layout, and then when you select a cell or a range, it will across highlight the cell. See screenshot:
doc change border color 4

doc kutools reading layout 3

Tip: You can change the settings of the Reading Layout by clicking Kutools > Reading Layout > Reading Layout Settings, and in the popping dialog, specify the options as you need. See screenshots:

doc change border color 5
doc change border color 6

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations