ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   counting cells with two criteria (https://www.excelbanter.com/excel-discussion-misc-queries/55579-counting-cells-two-criteria.html)

USChad

counting cells with two criteria
 
Ive got a spreadsheet that I need to find the number of cells in column G
that fit between two different criteria. The criteria are two numbers that
may change in cell a2 and a3. So that if i change a2 or a3 i will get a new
number in the cell with this formula. I dont need the numbers summed. Just
the number of times the numbers fit. Thanks in advance.

Chad

Chip Pearson

counting cells with two criteria
 
Try the following formula

=SUMPRODUCT(--(G1:G100=A2),--(G1:G100<=A3))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"USChad" wrote in message
...
Ive got a spreadsheet that I need to find the number of cells
in column G
that fit between two different criteria. The criteria are two
numbers that
may change in cell a2 and a3. So that if i change a2 or a3 i
will get a new
number in the cell with this formula. I dont need the numbers
summed. Just
the number of times the numbers fit. Thanks in advance.

Chad





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

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