Function Problems

Use Excel Formulas to Count Values in Different Cells

Tauseeq MagsiTauseeq Magsi Nov 20, 2026 870 views

Question details

The user needs to count values that meet conditions in different cells and understand whether a formula can increment another cell.

Use Excel Formulas to Count Values in Different Cells
Product
Microsoft Excel
Device & OS
not provided
Scenario
Calculate totals from worksheet values, potentially displaying them in cells such as A25 or A32.
Observed behavior
COUNTIF and COUNTIFS return calculated counts; they do not directly change the contents of another cell.
Before you start

Identify the source cells and the criteria you want to count. Choose an output cell outside the ranges used in its formula to avoid a circular reference.

Solution 1Recommended

Count matching values with COUNTIF

Use COUNTIF when you need a total that updates as values in the source cells change.

1
Select the result cell

Click a cell outside the source range, such as A25 if the values are in A1:A24.

2
Enter the count formula

Type =COUNTIF(A1:A24,"yes") in the formula bar and press Enter. Replace the range and criterion with your own.

3
Count separate cells

For nonadjacent cells, add separate counts, such as =COUNTIF(A1,"yes")+COUNTIF(A10,"yes").

Count matching values with COUNTIF
Calculated totals do not increment other cells: The formula displays a count in its own cell. It does not add 1 to a different cell or retain a history of changes.
Count values with WPS Spreadsheet

Count matching cells in WPS Spreadsheet

Use COUNTIF or COUNTIFS in WPS Spreadsheet to calculate totals from your worksheet data and update them as the source values change.

  1. 1. Open your spreadsheet: Open WPS Spreadsheet and select Open to load your workbook.
  2. 2. Select a result cell: Click a blank cell outside the range you want to count.
  3. 3. Enter a formula: Type =COUNTIF(A1:A24,"yes") in the selected cell and press Enter. Adjust the range and criterion to match your data.
  4. 4. Save the workbook: Select File > Save or Save As to save the workbook in your preferred supported format.
Count matching values with familiar COUNTIF and COUNTIFS formulasOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface to review formulas and resultsWork with spreadsheets in the free WPS Office suite
QA img-9

Frequently Asked Questions

Can COUNTIF add 1 to another cell?

No. COUNTIF returns a calculated count in the cell containing the formula. To change another cell's stored value, use VBA or calculate the total from source data instead.

How do I count values in nonadjacent cells?

Add separate COUNTIF results in an output cell. For example, =COUNTIF(A1,"yes")+COUNTIF(A10,"yes") counts matches in A1 and A10.

How do I count rows that meet two conditions?

Enter a COUNTIFS formula such as =COUNTIFS(A1:A24,"yes",B1:B24,"complete"). The ranges must have the same dimensions and refer to corresponding rows.

Why does my count formula show a circular reference?

The result cell may be included in its own count range. Move the formula outside that range or edit the range in the formula bar so it excludes the result cell.