+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Find the Range between two numbers

  1. #1
    Registered User
    Join Date
    02-14-2012
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Wink Find the Range between two numbers

    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

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Find the Range between two numbers

    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.

  3. #3
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Find the Range between two numbers

    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.

  4. #4
    Registered User
    Join Date
    02-14-2012
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Find the Range between two numbers

    Thanks tom1977!

    What is the difference between COUNTIF and COUNTIFS? After posting my question, I did some research, but I am confused.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Find the Range between two numbers

    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.

  6. #6
    Registered User
    Join Date
    02-14-2012
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Find the Range between two numbers

    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?

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Find the Range between two numbers

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1