+ Reply to Thread
Results 1 to 4 of 4

Thread: SUMIF criteria using the AND function

  1. #1
    Registered User
    Join Date
    03-13-2010
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    49

    SUMIF criteria using the AND function

    I am using this formula in a spreadsheet


    =SUMIF(A6:A45,"<>",(B6:B45))
    If A6 to A45 contains data it sums the corresponding numbers in B6 to B45. I would also like to only sum the numbers that are smaller than 1. I thought I could use the AND function combined with SUMIF but cannot get it to work. Something like this

    =SUMIF('PUPIL DATA'!$A$6:$A$45,AND("<>",<1)),(CW$117:CW$155)))
    Any ideas/help greatly appreciated.

  2. #2
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,712

    Re: SUMIF criteria using the AND function

    I need a clarification...are you looking to:
    • sum Col_CW values on another sheet
    where the corresponding Col_A cells on the current sheet:
    • are not blank
    • are less than 1
    ?
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,213

    Re: SUMIF criteria using the AND function

    Try SUMPRODUCT function:

    =SUMPRODUCT(--('PUPIL DATA'!$A$6:$A$45<>""),--('PUPIL DATA'!$A$6:$A$45<1),CW$117:CW$155))

    BUT your ranges must be same:

    6-45
    117-155

    is not same...
    "Relax. What is mind? No matter. What is matter? Never mind!"

  4. #4
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    2,998

    Re: SUMIF criteria using the AND function

    perhaps

    =SUMPRODUCT(--(A6:A45<>"")*(B6:B45<1), B6:B45)
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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.2.0