Hi, i've read other topics about countif with two conditions, but didin't had a satisfatory answer for my problem.
I have a sheet with two colums:
A B
NAME AGE
A B
ROGER 18
ANDREAS 42
CARL 21
MIKE 05
This sheet has over 10.000 lines ^^.
I'd like to count how many of these people has age between 0 and 5 years (math transcription >=0<=5), 6 and 10 (>=6<=10) and keep going...
I've read about sumproduct, many topics change countif to sumproduct, but it doesn't help me at all...
I created another column with the variables writen in math formulas, for ex:
Column D
Line 1) >=18<=24
Line 2) >=25<=30
Line 3) >=31<=35
and then i tried to link this cells as a condition of the countif formula. for ex.: =COUNTIF(A4:B4;D2), but it doens't show me the correct result, it always shows "1".
If someone could help, 'l appreciate it.
You can't link the cells like that...
In Excel 2010 use COUNTIFS
e.g.
=COUNTIFS(B2:B4;">=18";B2:B4;"<=24")
or if you have the numbers in cells...
=COUNTIFS(B2:B4;">=" & D2;B2:B4;"<=" & D3) where D2 and D3 contain 18 and 24, respectively
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks