what function do I use if I want to count the number of people between two number?
For example, for the data that I have, there are 1000 people. I want to count the number of people that weigh between 145 and 165.
Thanks
what function do I use if I want to count the number of people between two number?
For example, for the data that I have, there are 1000 people. I want to count the number of people that weigh between 145 and 165.
Thanks
try:
=COUNTIFS(B1:B100,">=145",B1:B100,"<=165")
where B1:B100 contain the individual weights.
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
with ex 2007 you can use COUNTIFS
Regards
tom1977
If You are satisfied with my solution click the small star icon on the left to say thanks.
Thanks tom1977!
What is the difference between COUNTIF and COUNTIFS? After posting my question, I did some research, but I am confused.
COUNTIF is used for one criteria only and can be used in all versions of Excel
COUNTIFS allows you to count based on multiple criteria and is only available as of Excel 2007 version. If you are in previous versions SUMPRODUCT() can be used for multiple conditions.
Thanks. I cannot use COUNTIFS since I only have 1 cell range. I am using COUNTIF. My total record is 33748 with size 1 through 4 with a MIN and MAX weight.
formula for size 1: =COUNTIF(A6:A33753, R11) - COUNTIF(A6:A33753,Q11) -- where R11 is the MAX weigh and Q11 is the MIN
I used the same formula for the next 3 row with just changing R11 and Q11. I divide the result above by 33748 to get the percentage of people within that range. My total from the result does not equal to 33748.
Can someone help me? What did I do wrong?
To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook. Don't upload a picture when you have a workbook question. None of us is inclined to recreate your data. Upload the workbook and manually add an 'after' situation so that we can see what you expect. In addition clearly explain how you get the results..
To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'.
To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.
On this page, below the message box, you will find a button labelled 'Manage Attachments'.
Clicking this button will open a new window for uploading attachments.
You can upload an attachment either from your computer or from another URL by using the appropriate box on this page.
Alternatively you can click the Attachment Icon to open this page.
To upload a file from your computer, click the 'Browse' button and locate the file.
To upload a file from another URL, enter the full URL for the file in the second box on this page.
Once you have completed one of the boxes, click 'Upload'.
Once the upload is completed the file name will appear below the input boxes in this window.
You can then close the window to return to the new post screen.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks