ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count the number of values in a list that meet certain criteria (https://www.excelbanter.com/excel-worksheet-functions/186272-count-number-values-list-meet-certain-criteria.html)

Fudgy

Count the number of values in a list that meet certain criteria
 
I would like to count the number of values that are greater than a cell
reference value. For example I have the following list in a spreadsheet:
242
318
743
426
174
397
108
75
And would like to compare the following numbers to see how many numbers in
the first list are greater than each of the numbers in the list below:
242
218
194
169
145
121
97
73
48
24
in other words there are 4 numbers in the first list greater than 242 in the
second list.
I can do this by the following formula:
=COUNTIF(G8:G17,"=242")
but it means manaually changong the formula each time with the number in the
second list e.g. 242, 218 etc.
I would like to automate this so I don't have to manually make these changes.
How do I do this as I have over 30 lists each with 10 values to compare?

Peo Sjoblom

Count the number of values in a list that meet certain criteria
 
Try

=COUNTIF($G$8:$G$17,"="&A8)


where A8 is the cell with 242

copy down


--


Regards,


Peo Sjoblom



"Fudgy" wrote in message
...
I would like to count the number of values that are greater than a cell
reference value. For example I have the following list in a spreadsheet:
242
318
743
426
174
397
108
75
And would like to compare the following numbers to see how many numbers in
the first list are greater than each of the numbers in the list below:
242
218
194
169
145
121
97
73
48
24
in other words there are 4 numbers in the first list greater than 242 in
the
second list.
I can do this by the following formula:
=COUNTIF(G8:G17,"=242")
but it means manaually changong the formula each time with the number in
the
second list e.g. 242, 218 etc.
I would like to automate this so I don't have to manually make these
changes.
How do I do this as I have over 30 lists each with 10 values to compare?





All times are GMT +1. The time now is 02:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com