How to select whole Table in Excel 

Selecting the entire table in a database is necessary in certain situations to perform operations or analyses that require access to all the data within the table. For instance, when conducting data integrity checks, generating comprehensive reports, or performing aggregations, it is essential to have a complete and accurate representation of the data. 

The provided data consists of two tables and each table follows a consistent format with a “Products” column that lists the names of the products and a “Sold at Price” column that displays the corresponding prices. These tables provide a clear overview of the products and their respective prices, allowing for easy reference and analysis. 

There can be two cases of selecting the tables which are “Selecting only one table” and “Selecting two tables at once”. To learn how to do it, follow the given below methods and steps: 

Case 1 – Selecting only one table 

In this case we will learn how to select one tab at once by simple methods which are given below. 

Method 1 – By using keyboard shortcuts 

Step 1 – Selecting the cell inside table 

  • Select any cell inside one of your tables. 
  • Selecting the cell inside the table is necessary otherwise, our keyboard shortcuts can’t select the whole table. 

Step 2 – Selecting the whole table 

  • Once you’ve selected the cell inside the table then, follow the steps below 
  • Press “Ctrl+A” to select the whole table. 
  • Alternatively, you can use “Ctrl+Shift+8” to do the same. 
  • As soon as you use the shortcut, whole table will be selected. 

Method 2 – By using the Name Box 

Step 1 – Selecting the whole table 

  • Click on the Name Box, located to the left of the formula bar. 
  • It displays the address of the active cell. 
  • Type the name of the table, if it has one, and press Enter. For example, if the table is named “Jan_sales,” type “Jan_sales” and press Enter.  
  • If the table does not have a name, then it would simply be named as Table1 or something like that. 
  • So, click on the downward arrow and click on the Table1 and the whole table will be selected. 

Case 2 – Selecting two tables at once 

Consider a case where you want to select two tables at once. To do this follow the methods and steps given below. 

Method 1 – By using Keyboard Shortcuts 

In this method, we will learn how to select two tables at once by using keyboard shortcut. We will use the shortcut mentioned in Case 1 Method 1 but this time we will use different technique so that we can select two tables at once.  

Step 1 – Selecting the cell inside table 

  • Select any cell inside one of your tables. 
  • Selecting the cell inside the table is necessary otherwise, our keyboard shortcuts can’t select the whole table. 

Step 2 – Selecting both tables 

  • Once you’ve selected the cell inside the table then, follow the steps below 
  • Press “Ctrl+A” to select the whole table. 
  • Then, press and hold Ctrl button and click on any cell inside other table. 
  • After that, press “Ctrl+A” again. 
  • Now, both tables are selected. 

Method 2 – By Using VBA code 

Step 1 – Adding a module 

  • To add a module, go to the Developer tab. 
  • select the first option called Visual Basic. 
  • This will open a new window, which can also be accessed using the shortcut key “Alt+F11”.  
  • Within this window, click on the Insert tab and choose the Module option. 
  • This will open a new module for you to work with. 

Step 2 – Writing the code and implementing it 

  • Copy and paste the following formula in code Editor. 

Sub SelectTables() 

    Dim ws As Worksheet 

    Dim tbl1 As ListObject 

    Dim tbl2 As ListObject 

    Dim rngSelection As Range 

    ‘ Set the worksheet object 

    Set ws = ThisWorkbook.Sheets(“Sheet1”) ‘ Replace “Sheet1” with the actual name of your worksheet 

    ‘ Set the table objects 

    Set tbl1 = ws.ListObjects(“Jan_sales”) ‘ Replace “Jan_sales” with the actual name of your first table 

    Set tbl2 = ws.ListObjects(“Feb_sales”) ‘ Replace “Feb_sales” with the actual name of your second table 

    ‘ Combine the ranges of both tables 

    Set rngSelection = Union(tbl1.Range, tbl2.Range) 

    ‘ Select the combined range 

    rngSelection.Select 

End Sub  

  • Then, click on the “Run macro” option or press F5.  
  • After that, close the editor and you’ll see that your tables are selected.