+ Reply to Thread
Results 1 to 4 of 4

Need help with multiple IF/SUMIF

  1. #1
    Registered User
    Join Date
    08-30-2006
    Posts
    10

    Need help with multiple IF/SUMIF

    I can use SUMIF fine but I am trying to have it check for two different validation. Column A is a date. Column B is number 1-3. Column C is a currency. I want to be able to check A to see if it is between date x and y then check to see whether it is 1, 2 or 3. The end result is adding all entries that are within a certain date range and 1.

    Thanx.

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Beowulfe,

    Try,

    =SUMPRODUCT((A2:A10>=G1)*(A2:A10<=H1)*(B2:B10=1)*(C2:C10))

    where G1 is your start date and H1 is your end date.


    HTH

    Steve

  3. #3
    Registered User
    Join Date
    08-30-2006
    Posts
    10
    Thanx. Will this work with open ended columns as well or is there a way to do that?

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Beowulfe
    Thanx. Will this work with open ended columns as well or is there a way to do that?
    SteveG's formula can made 'open ended' however the ranges selected must be equal ranges, and must contain valid data.
    An example is to set the last row number in (say) D1 and use

    =SUMPRODUCT((INDIRECT("A2:A"&D1)>=G1)*(INDIRECT("A2:A"&D1)<=H1)*(INDIRECT("B2:B"&D1)=1)*( INDIRECT("C2:C"&D1)))

    If needed you can use the 'Worksheet_Calculate' trigger and the 'LastRow = Sheets("Sheet1").Range("A65536").End(xlUp).Row' to auto-set the range in D1.

    Does this help?
    ---

+ 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