Select Cells in Excel using Macros and VBA

Add to Favorites

This is actually a very easy thing to do and only requires a couple lines of code. Below I will show you how to select a cell or a range of cells on the currently active or visible worksheet in Excel.

The simplest way to this is with a macro like this:

Sub Select_Cells_in_Excel()

'Select a single cell in the current worksheet

Cells(4, 3).Select

End Sub

Copy and paste this into your Excel workbook and read the comments, which will appear in green, to follow everything.

The basic way to select a cell in the currently active worksheet in Excel is to use this method:


This is pretty simple to understand.  All you have to do is to change A1 to whichever cell you want to be selected.  Thats it!

I prefer to use the range method since it is the simplest way to select a cell.  When you create more advanced macros in VBA you may need to use the Cells method.


This sample is in the macro above and it points you to cell C4.  The first number is the row of the cell to select, 4, and the second number is the column, 3.  To get the column number you just count from 1, which is the letter A down to the letter column you wish to reference.  A =1, B=2,C=3, etc.

So, you can see that it is actually very easy to select a cell in Excel using macros and VBA.  If I were you, I would stick to using the Range method of doing this just because it is so much easier to tell which cell is being referenced just by looking at the code in question.

Question? Ask it in our Excel Forum

Our Excel Courses

  • Skill Level: All Levels
  • |
  • 5 hours+

How to make a fully featured professional form in Excel that is unbreakable. This includes how to use the form to store, view, edit, and delete data from a data storage worksheet.

  • Skill Level: All Levels
  • |
  • 2 hours

Send Emails from Excel using VBA and Macros. This course starts from the Basics and builds up to more advanced examples with attaching workbooks, worksheets, PDF's, automatically sending emails, including a signature, error handling, increasing speed, and more.

Similar Content on TeachExcel
Select Ranges of Cells in Excel using Macros and VBA
Tutorial: This Excel VBA tutorial focuses specifically on selecting ranges of cells in Excel.  This...
Loop through a Range of Cells in Excel VBA/Macros
Tutorial: How to use VBA/Macros to iterate through each cell in a range, either a row, a column, or ...
VBA File Selection Window to Open Files in Excel
Tutorial: Make a file selection browser in Excel using VBA/Macros - this is the file window that al...
Automatically Lock Certain Cells in Excel using a Macro
Tutorial: This macro allows you to have a cell automatically locked after a user enters something in...
Save Hours with the Selection Pane in Excel
Tutorial: How to quickly work on shapes in Excel using the Selection Pane. This includes quickly pr...
Center Titles Across Multiple Cells in Excel
Tutorial: How to center a title across multiple cells in Excel in order to make good looking titles...