What Is an Active Cell in Excel? (A Complete Guide)

An active cell, also known as a cell pointer or selected cell, refers to a cell in the Excel spreadsheet that is currently selected. Typically, an active cell has a thick border around it.
Each cell in Excel has a unique address which is denoted by a column letter and row number.
Note: In the example, the letter (C) refers to the Columns while the number (7) represents the Rows.

what is active cell in excel

A worksheet in Excel contains around 17 billion cells and the last cell in the worksheet has the address XFD1048576. Here, XFD is the Column letter whereas 1048576 is the Row number.

what is active cell in excel


Changing the Active Cell in Excel

In order to change the active cell, you can use the Arrow keys (Up, Down, Left, and Right) on your keyboard or left-click to jump into any cell.
If you hit the Right Arrow key, the active cell will move to the right of the current active cell.

Changing Active Cell

The address of the currently active cell is shown in the Name Box in the top-left corner.

what is active cell in excel


Selecting Multiple Cells as Active Cells

Generally speaking, you can select multiple cells in a spreadsheet, however, there can be only one active cell at a time. Here, although we’ve chosen multiple cells (B5:D9), only the B5 cell is active.

Multiple Cells Working as Active Cell

Steps:

  • Select a range of cells, here, we’ve selected the B5:D9 cells.
  • Type in a text or any value in the Formula Bar.
  • Press the Ctrl + Enter keys on your keyboard. This auto-fills the values or formulas across the range.

what is active cell in excel

The result should look like the image shown below.

what is active cell in excel


Formatting the Active Cell in Excel

Enter Edit Mode:

  • Press the F2 key or double-click the left button on the mouse to enter into Edit Mode.

Formatting Active Cell

  • Type in a value or text and press the Enter key.

Formatting Active Cell


Method 1 – Using the Format Cells Dialog Box

Consider the List of Company Stock Prices dataset shown in the B4:D13 cells. The dataset shows the Company name, its Ticker, and the Stock Price, respectively.
We want to format the Stock Price column to show the prices in USD.

Formatting Active Cell

Steps:

  • Select the D5:D13 cells.
  • Right-click and choose Format Cells.

Using Format Cells Option

This opens the Format Cells dialog box.

  • Click the Number tab.
  • In the Currency section, select 2 Decimal places and hit OK.

Currency Format

This formats the Stock Prices in the USD.

what is active cell in excel


Method 2 – Using Keyboard Shortcuts

Steps:

  • Select the D5:D13 cells.
  • Press Ctrl + 1.

Using Keyboard Shortcut

This opens the Format Cells wizard.

  • Format as Currency with 2 decimal places.

Currency Format

This formats the Stock Prices in USD as shown in the image below.

what is active cell in excel


Method 3 – Applying a VBA Macro Tool

Steps:

  • Navigate to the Developer tab and click the Visual Basic button.

Applying VBA Code

This opens the Visual Basic Editor in a new window.

  • Go to the Insert tab and select Module.

Inserting Module

  • Copy the code from here and paste it into the window as shown below.
Sub Format_Cell()
Worksheets("Sheet1").Activate
Range("D5:D13").Select
Selection.NumberFormat = "$#,##0.0"
End Sub

Inserting VBA Code

Code Breakdown:

  • In the first portion, the sub-routine is given a name, here it is Format_Cell().
  • The ActiveSheet property activates the worksheet, in this case, Using VBA Code.
  • Range.Select method specifies the column that you want to format.
  • Enter the NumberFormat property to get the result in USD.

Code Breakown

  • Close the VBA window and click the Macros button.

This opens the Macros dialog box.

  • Select the Format_Cell macro and hit the Run button.

what is active cell in excel

The output should look like the picture shown below.

what is active cell in excel


How to Make A1 the Active Cell in Excel

Steps:

  • Insert the following code in a VBA module (see Method 4 above).
Sub Make_A1_Active()
Dim wksht As Worksheet
For Each wksht In ThisWorkbook.Worksheets
    Application.Goto reference:=wksht.Range("A1"), scroll:=True
Next wksht
End Sub

How to Make A1 the Active Cell in Excel

Code Breakdown:

  • The sub-routine is given a name, here it is Make_A1_Active().
  • We defined the variable wksht.
  • A For-Next statement will loop through all the worksheets and jump to the A1 cell using the Range property.

Code Breakown

  • Close the VBA window and click the Macros button.

This opens the Macros dialog box.

  • Select the Make_A1_Active macro and hit the Run button.

How to Make A1 the Active Cell in Excel

Your result should look like the image shown below.

what is active cell in excel


Read More:


Highlighting the Active Cell with Excel VBA Code

Steps:

  • Open the VBA editor.

Highlighting Active Cell with VBA Code

  • Double-click on Sheet6 (Highlight Active Cell) shown in the image below.

Inserting VBA Code

  • Select the Worksheet option, copy the code from here, and paste it into the window.

In the code shown below, the ActiveCell property stores the Address of the active cell in the G4 cell.

Private Sub Highlight_Active_Cell(ByVal Target As Range)
Range("G4").Value = ActiveCell.Address
End Sub

Inserting VBA Code

  • Exit the Visual Basic Editor and you’ll see that the G4 cell shows the address of the active cell.

Highlighting Active Cell with VBA Code

  • Select the A1 cell, then click the Select All button (step 2).

Selecting All Cells

  • Click the Conditional Formatting option and select New Rule.

Applying Conditional Formatting

The New Formatting Rule wizard pops up.

  • Choose the Use a formula to determine which cells to format option.
  • In the Rule Description, enter the following formula.

=ADDRESS(ROW(A1),COLUMN(A1))=$G$4

  • Click on the Format box to specify the cell color.

what is active cell in excel

This opens the Format Cells wizard.

  • Click the Fill tab and choose a color of your liking. We’ve chosen the Bright Yellow color.
  • Hit the OK button.

Format Cells

The active cell will be highlighted and its address will be shown in the G4 cell.

what is active cell in excel


Download the Practice Workbook


Related Articles


<< Go Back to Excel Cells | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!

Tags:

Kawser Ahmed
Kawser Ahmed

Kawser Ahmed is a Microsoft Excel Expert, Udemy Course Instructor, Data Analyst, Finance professional, and Chief Editor of ExcelDemy. He is the founder and CEO of SOFTEKO (a software and content marketing company). He has a B.Sc in Electrical and Electronics Engineering. As a Udemy instructor, he offers 8 acclaimed Excel courses, one selected for Udemy Business. A devoted MS Excel enthusiast, Kawser has contributed over 200 articles and reviewed thousands more. His expertise extends to Data Analysis,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo