+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Sum of cells with numbers in a range

Hybrid View

  1. #1
    Registered User
    Join Date
    04-24-2010
    Location
    Tennessee, USA
    MS-Off Ver
    Excel 2007
    Posts
    9

    Sum of cells with numbers in a range

    I am tallying the number of cells in two columns that have numbers within a certain range.

    Formula 1 is working and Formula 2 is not. They are identical formulas (I think) and can not get a tally on the cells that fall within the criteria of question 2.

    1. How many cells are greater than 1.5 but not more than.3.0?
    =COUNTIF('XX''s Survey Data'!AE2:AE291,">1.5")-COUNTIF('XX''s Survey Data'!AE2:AE291,"<=3.0")+COUNTIF('XX''s Survey Data'!BC2:BC291,">1.5")-COUNTIF('XX''s Survey Data'!BC2:BC291,"<=3.0")

    2. How many cells are greater than 3 but not more than 5.0?
    =COUNTIF('XX''s Survey Data'!AE2:AE291,">3.0")-COUNTIF('XX''s Survey Data'!AE2:AE291,"<=5.0")+COUNTIF('XX''s Survey Data'!BC2:BC291,">3.0")-COUNTIF('XX''s Survey Data'!BC2:BC291,"<=5.0")

    The second formula gives a negative number (-7) as the result
    Please correct me for improper posting or misinformation. I have gathered plenty from the forums but this is my first post. Many thanks in advance.
    Last edited by shetektn; 06-23-2011 at 11:08 PM. Reason: SOLVED

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

    Re: Sum of cells with numbers in a range

    Are you using XL2007 or XL2003:

    In both versions:

    =COUNTIF('XX''s Survey Data'!AE2:AE291,">1.5")-COUNTIF('XX''s Survey Data'!AE2:AE291,">3.0")+(COUNTIF('XX''s Survey Data'!BC2:BC291,">1.5")-COUNTIF('XX''s Survey Data'!BC2:BC291,">3.0"))

    and

    =COUNTIF('XX''s Survey Data'!AE2:AE291,">3.0")-COUNTIF('XX''s Survey Data'!AE2:AE291,">5.0")+(COUNTIF('XX''s Survey Data'!BC2:BC291,">3.0")-COUNTIF('XX''s Survey Data'!BC2:BC291,">5.0"))

    In XL2007 and later...

    =COUNTIFS('XX''s Survey Data'!AE2:AE291,">1.5",'XX''s Survey Data'!AE2:AE291,"<=3.0")+COUNTIFS('XX''s Survey Data'!BC2:BC291,">1.5",'XX''s Survey Data'!BC2:BC291,"<=3.0")

    and

    =COUNTIFS('XX''s Survey Data'!AE2:AE291,">3.0",'XX''s Survey Data'!AE2:AE291,"<=5.0")+COUNTIFS('XX''s Survey Data'!BC2:BC291,">3.0",'XX''s Survey Data'!BC2:BC291,"<=5.0")
    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
    Registered User
    Join Date
    04-24-2010
    Location
    Tennessee, USA
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Sum of cells with numbers in a range

    NBVC, you are awesome! I have worked with formulas since Excel 97 days. I have always been able to figure out a way to get what I wanted out of a SS but this was a pill. CORRECTION: Neither of my above listed formulas worked when I counted and tried to verify totals! Apologies. This formula was created originally in 2003 and then edited with 2007 saving as 97-2003 workbook.
    THANK YOU, THANK YOU!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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