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

Get FREE Advanced Excel Exercises with Solutions!

For those of you who have started learning Excel, we have some good news for you. In this article, we’ll discuss all your queries regarding what is an active cell in Excel. In addition, we’ll see how to select, change, format, and highlight the active cell using Excel options, shortcuts, and VBA code.


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 in selection. 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, for instance, the address of the C7 cell is shown in the image below.
📄 Note: The letter (C) refers to the Columns while the number (7) represents the Rows.

what is active cell in excel

Now, 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 Active Cell in Excel

In this portion, we’ll learn how to navigate an Excel worksheet, so let’s begin.
In order to change the active cell, you can use the Arrow keys (Up, Down, Left, and Right) on your keyboard or you can Left-click your mouse to jump into any cell.
For example, if you hit the right Arrow key the active cell will move to the right of the current active cell.

Changing Active Cell

Next, 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 Excel Multiple Cells as Active Cell

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

Now, to make our lives easier, Excel has a nifty trick to populate multiple rows at once with a specific value or text. So, just follow these steps.

📌 Steps:

  • Firstly, select a range of cells, here, we’ve selected the B5:D9 cells.
  • Now, type in a text or any value in the Formula Bar which in this case is, Exceldemy.
  • Lastly, press the CTRL + ENTER keys on your keyboard.

what is active cell in excel

The result should look like the image shown below.

what is active cell in excel


Formatting Active Cell in Excel

Admittedly, we haven’t discussed how to enter a value into a cell, hence let us see the process in detail.

📌 Steps:

  • Initially, press the F2 key or Double-click the left button on the mouse to enter into the Edit Mode in Excel.

Formatting Active Cell

  • Then, type in a value or text like Exceldemy and press the ENTER key.

Formatting Active Cell

That’s it you’ve placed text into a cell.
Now, that we’ve learned to navigate and enter data in Excel, our next priority would be to Format the cells according to our preferences. So, let’s take a deep dive into this matter.


1. Using Format Cells Dialog Box

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

Formatting Active Cell

📌 Steps:

  • First and foremost, select the D5:D13 cells >> Right-click the mouse button to open the list >> choose Format Cells options.

Using Format Cells Option

Now, this opens the Format Cells dialog box.

  • Next, click the Number tab >> in the Currency section, select 2 Decimal places >> hit OK.

Currency Format

Eventually, this formats the Stock Prices in the USD.

what is active cell in excel


2. Using Keyboard Shortcut

Wouldn’t it be great if only there was a keyboard shortcut to Format Cells? Well, you’re in luck because the next method answers your question. So, let’s see it in action.

📌 Steps:

  • First of all, select the D5:D13 cells >> press the CTRL + 1 keys.

Using Keyboard Shortcut

Now, this opens the Format Cells wizard.

  • In turn, click the Number tab >> go to the Currency section and select 2 Decimal places >> press the OK button.

Currency Format

Consequently, this formats the Stock Prices in USD as shown in the image below.

what is active cell in excel


3. Applying VBA Macro Tool

If you often need to format a column into currency, then you may consider the VBA code below. It’s simple & easy, just follow along.

📌 Steps:

  • Firstly, navigate to the Developer tab >> click the Visual Basic button.

Applying VBA Code

This opens the Visual Basic Editor in a new window.

  • Secondly, go to the Insert tab >> select Module.

Inserting Module

For your ease of reference, you can 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:

Now, I will explain the VBA code used to generate the table of contents.

  • In the first portion, the sub-routine is given a name, here it is Format_Cell().
  • Next, use the ActiveSheet property to activate the worksheet, in this case, Using VBA Code.
  • Then, utilize the Range.Select method to specify the column that you want to format.
  • Finally, enter the NumberFormat property to get the result in USD.

Code Breakown

  • Thirdly, close the VBA window >> click the Macros button.

This opens the Macros dialog box.

  • Following this, select the Format_Cell macro >> hit the Run button.

what is active cell in excel

Subsequently, the output should look like the picture shown below.

what is active cell in excel


How to Make A1 the Active Cell in Excel

Sometimes you may want to make the A1 cell active, now this can be tedious if you have multiple worksheets. Don’t worry just yet! VBA has covered. Now, allow me to demonstrate the process in the steps below.

📌 Steps:

  • To begin with, run Steps 1-2 from the previous method i.e., open the Visual Basic editor, insert a new Module, and enter the code.
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:

Now, I will explain the code used to make the A1 cell active.

  • To start, the sub-routine is given a name, here it is Make_A1_Active().
  • Next, define the variable wksht.
  • Then, use the For-Next statement to loop through all the worksheets and jump to the A1 cell using the Range property.

Code Breakown

  • Thirdly, close the VBA window >> click the Macros button.

This opens the Macros dialog box.

  • Following this, select the Format_Cell macro >> hit the Run button.

How to Make A1 the Active Cell in Excel

Finally, your result should look like the image shown below.

what is active cell in excel


Read More:


Highlighting Active Cell with Excel VBA Code

Now, wouldn’t it be great if you could highlight the active cell and display its address in a cell? In order to do this, you can follow these simple steps.

📌 Steps:

  • First of all, navigate to the Developer tab >> click the Visual Basic button.

Highlighting Active Cell with VBA Code

This opens the Visual Basic Editor in a new window.

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

Inserting VBA Code

  • Next, 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

  • Then, 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

  • Thirdly, select the A1 cell (step 1) >> then click the Select All button (step 2).

Selecting All Cells

  • Now, click the Conditional Formatting option >> select New Rule.

Applying Conditional Formatting

In an instant, the New Formatting Rule wizard pops up.

  • Next, choose the Use a formula to determine which cells to format option.
  • Then, in the Rule Description enter the following formula.

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

  • Now, click on the Format box to specify the cell color.

what is active cell in excel

This opens the Format Cells wizard.

  • In turn, click the Fill tab >> choose a color of your liking, for example, we’ve chosen Bright Yellow color >> hit the OK button.

Format Cells

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

what is active cell in excel


Download Practice Workbook

You can download the practice workbook from the link below.


Conclusion

This article provides the answer to what is an active cell in Excel quickly and easily. Make sure to download the practice files. Hope you found it helpful. Please inform us in the comment section about your experience. Keep learning and keep growing!


Related Articles


<< Go Back to Excel Cells | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.

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