5 Ways To Add Only Visible Cells In Excel

Intro

Discover how to efficiently add only visible cells in Excel with our expert tips. Learn 5 simple methods to sum, average, and count visible cells, ignoring hidden or filtered data. Boost your productivity and accuracy with our step-by-step guide, covering topics like Excel formulas, conditional formatting, and pivot tables.

Excel is an incredibly powerful tool for data analysis, and one of the most common tasks is to work with data that is visible after filtering. However, many users struggle with the issue of only adding visible cells in Excel. This can be a challenge, especially when working with large datasets. Fortunately, there are several ways to achieve this, and we will explore five methods in this article.

Method 1: Using the SUBTOTAL Function

The SUBTOTAL function is a powerful tool in Excel that allows you to perform calculations on visible cells only. This function is particularly useful when working with filtered data. To use the SUBTOTAL function, follow these steps:

Using the SUBTOTAL function in Excel
  1. Select the cell where you want to display the sum of visible cells.
  2. Type "=SUBTOTAL(109," and select the range of cells you want to add.
  3. Close the parenthesis and press Enter.

The SUBTOTAL function uses a code to specify the calculation type. In this case, we use 109 for the SUM calculation. You can use other codes for different calculations, such as 101 for AVERAGE or 102 for COUNT.

Method 2: Using the AutoSum Feature

The AutoSum feature in Excel is a quick way to add visible cells. To use AutoSum, follow these steps:

Using the AutoSum feature in Excel
  1. Select the cell where you want to display the sum of visible cells.
  2. Go to the "Formulas" tab in the ribbon.
  3. Click on the "AutoSum" dropdown button.
  4. Select "Sum" from the dropdown menu.
  5. Select the range of cells you want to add.

Method 3: Using the SUMIFS Function

The SUMIFS function is a powerful tool in Excel that allows you to sum cells based on multiple criteria. To use the SUMIFS function, follow these steps:

Using the SUMIFS function in Excel
  1. Select the cell where you want to display the sum of visible cells.
  2. Type "=SUMIFS(" and select the range of cells you want to add.
  3. Specify the criteria range and criteria.
  4. Close the parenthesis and press Enter.

Method 4: Using VBA Macro

If you need to add visible cells frequently, you can create a VBA macro to automate the process. To create a VBA macro, follow these steps:

Using a VBA macro in Excel
  1. Press Alt + F11 to open the VBA Editor.
  2. Insert a new module by clicking "Insert" > "Module".
  3. Paste the following code: Sub AddVisibleCells() Range("A1").Value = Application.WorksheetFunction.Sum(Range("A:A").SpecialCells(xlCellTypeVisible)) End Sub
  4. Save the module by clicking "File" > "Save".

Method 5: Using Power Query

Power Query is a powerful tool in Excel that allows you to perform advanced data analysis. To use Power Query to add visible cells, follow these steps:

Using Power Query in Excel
  1. Select the range of cells you want to add.
  2. Go to the "Data" tab in the ribbon.
  3. Click on the "From Table/Range" button.
  4. Select the range of cells you want to add.
  5. Click on the "Load" button.

Gallery of Excel Tips and Tricks

We hope this article has helped you to learn how to add only visible cells in Excel using five different methods. Whether you're a beginner or an advanced user, these methods will help you to work more efficiently with your data. If you have any questions or need further assistance, please don't hesitate to ask. Share your thoughts and experiences in the comments section below!

Jonny Richards

Love Minecraft, my world is there. At VALPO, you can save as a template and then reuse that template wherever you want.