5
Ghani Rozaqi
02/01/2023 1:49:40
Counting Values in Another Column in Google Sheets
Counting Values in Another Column in Google Sheets
Counting Values in Another Column in Google Sheets
To count how many values in one column are greater than or equal to values in another column in Google Sheets, you can use either a traditional formula or an array formula.
Here are the steps for using a traditional formula:
- In an empty column, enter the formula
=B1>=A1
in the first cell, where B and A represent the columns you want to compare. - Drag the formula down to the last row of data by clicking and dragging the small blue square in the bottom-right corner of the cell.
- In a new cell, enter the formula
=COUNTIF(C:C, TRUE)
, where C is the column containing the results of the comparison formula. This will count how many cells in column C contain the valueTRUE
, indicating that the value in column B is greater than or equal to the value in column A.
To use an array formula, follow these steps:
- In an empty cell, enter the formula
=COUNTIF(B:B>=A:A, TRUE)
. This formula compares all values in column B to all values in column A, and returns the number of instances where the value in column B is greater than or equal to the value in column A. - Press
Ctrl + Shift + Enter
to turn the formula into an array formula. This will cause the formula to be enclosed in curly braces {}.
You can then delete the comparison column if desired, as the array formula will give you the same result in a single cell.
Categorised in: Google Sheets