Count function

R

Ranjith Kurian

I have a column called as COST as shown below, i need a excel formula to pick
the data count from cost column to my count column based on Cost Range column.
example:
Cost column
3
3.5
4
2
2.5
1

Cost Range column count column
4-3
2-1

Answer expected:

Cost Range column count column
4-3 3
2-1 3

Count column is nothing but it should count less than 4 and greater than 3
(3,3.5 and 4 are the answers)
 
E

Eduardo

Hi,
for option between 4-3

=COUNTIFS(A7:A12,">2",A7:A12,"<=4")

for option 1-2

=COUNTIFS(A7:A12,">=1",A7:A12,"<=2")
 
E

Eduardo

Hi
I didn't know you were using 2003, try this

=COUNTIF(A7:A12,">2")-COUNTIF(A7:A12,">4")
 
A

Ashish Mathur

Hi,

Suppose data is in range C4:C9. Enter 4 in C13, 3 in D13, 2 in C14 and 1 in
D14. In cell E13, enter
=COUNTIF($C$4:$C$9,">="&D13)-COUNTIF($C$4:$C$9,">"&C13) and copy down

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
T

T. Valko

=SUM(COUNTIF(A1:A6,{">=3",">4"})*{1,1})

You probably meant:

=SUM(COUNTIF(A1:A6,{">=3",">4"})*{1,-1})
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top