Excel: Apply Formula Only to Filtered Cells

Excel is a powerful tool that enables users to quickly and easily organize, analyze, and present data. Its formula feature is a key factor to its success, allowing users to quickly make calculations and transformations. However, when using this feature, it is important to understand how to apply formulas only to filtered cells. This is an important skill that allows users to ensure accuracy and precision in their calculations. In this article, we will discuss the importance of applying formulas only to filtered cells, as well as how to do so. By the end, you should have a better understanding of how to use this powerful tool to your advantage.


Often you may want to apply some formula in Excel only to filtered cells.

Fortunately this is straightforward to do and the following example shows how to do so.

Example: Apply Formula Only to Filtered Cells in Excel

Suppose we have the following dataset in Excel that contains information about various basketball players:

Suppose we would like to create a new column that uses a formula to display the value in the Points column doubled, but only for players who have a value of “Guard” in the Position column.

To do so, we can first filter the dataset to only show the rows where the value is “Guard” in the Position column:

Notice that players with a value of “Forward” or “Center” in the Position column are currently hidden.

Next, we can type the following formula into cell D2:

=C2*2

We can then manually click and drag this formula down to each remaining cell in column D:

Excel apply formula only to filtered cells

Column D now shows the value of the corresponding cell in the Points column multiplied by 2.

Lastly, we can remove this filter and we’ll see that this formula has only been applied to the players with a value of “Guard” in the Position column:

The value in the new Double Points column is simply blank for all players who were not visible when we applied the filter.

In conclusion, this example showed how to apply a formula only to filtered cells in Excel. The process involved first filtering the dataset to only show the rows with the relevant values, entering the formula in the appropriate cell, and then manually dragging the formula down to the remaining cells. Finally, the filter was removed and the formula was applied only to the filtered cells. This process can be used for other operations in Excel to help make working with datasets more efficient.

x