Dataset Overview
We’ll use the below dataset to demonstrate the steps to be taken to delete a data table.
Method 1 – Using a Peripheral Device to Remove a Table from the Data Model in Excel
- Select the data table (from B4 to E13 in our dataset).
- Right-click your mouse.
- Choose Table Columns under the Delete option.
- This will delete the data table.
- You can delete table data without changing the table format by selecting the data range and pressing the Delete button on your keyboard.
Method 2 – Using Design Tab to Delete a Data Table Without Deleting Data in Excel
- Select the range B4:E13 of the data table.
- Go to Table Design, select Tools and click on Convert to Range.
- Confirm the conversion when the Microsoft Excel warning box appears.
- This will delete the table while preserving formatting and data.
Method 3 – Applying Clear Command to Delete a Data Table in Excel
- Select the range B4:E13.
- Go to Home, select Editing and click on Clear All.
- This will delete the data table, including data and formatting.
Method 4 – Running an Excel VBA Code to Delete a Data Table
- Go to the Developer tab and click on Visual Basic.
- Insert a module (go to Insert and select Module).
- Enter the following VBA code in the module:
Sub delete_data_table()
Cells.Range("B4:E13").Delete
End Sub
- Run the VBA code (go to Run → Run Sub/UserForm).
- This will remove the data table.
- To open the Microsoft Visual Basic for Applications window, press Alt + F11 simultaneously.
- You can also use the ALT + L + V shortcut to open the Microsoft Visual Basic Applications window.
- If the Developer tab is not visible in your ribbon, you can make it visible by going to File → Options → Customize Ribbon.
Download Practice Workbook
You can download the practice workbook from here:
Related Articles
- How to Create One Variable Data Table in Excel
- How to Create One Variable Data Table Using What-If Analysis
- How to Create a Two-Variable Data Table in Excel
- How to Create a Data Table with 3 Variables
- How to Create a 4-Variable Data Table in Excel
<< Go Back to Data Table in Excel | What-If Analysis in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!