+ Reply to Thread
Results 1 to 4 of 4

Multiple if criteria in one statement (if/sumproduct)

  1. #1
    Registered User
    Join Date
    12-05-2005
    Posts
    13

    Multiple if criteria in one statement (if/sumproduct)

    Hello. I am having a problem with extremely long formulas, and I was wondering if there was any way to tidy them up a little bit.

    I have a set of data that has a column with the date it was entered into the spreadsheet. I am currently trying to gather all the data that was entered on Mondays.

    ie. The dates 38719, 38726, 38733, 38740, 38747, and 38754 (all the Monday dates in 2006).

    I am currently using sumproduct formulas to determine the dollar value of items entered on Mondays, are a certain type of item, and another criteria. So my formula currently looks like:

    =sumproduct((Criteria 1)*(Criteria 2)*(Criteria 3), (Dollar Value))

    This works fine for a range of dates or a single date, but I am curious if there is any way to be able to put the range of above Monday dates into a single criteria field of the sumproduct formula. I would also love to know if there is another way of doing this without using sumproduct.

    Thanks much!

    Nick

  2. #2
    Pete_UK
    Guest

    Re: Multiple if criteria in one statement (if/sumproduct)

    The criteria for finding Mondays would be:

    WEEKDAY(date_cell)= 2

    as WEEKDAY returns 1 for Sunday, 2 for Monday etc.

    You could use an array formula instead of SUMPRODUCT, along the lines
    of:

    =SUM(IF((criterion1)*(criterion2)*(criterion3),range_to_sum,0))

    but it will be about as long as the SUMPRODUCT formula and will have to
    be entered with CTRL-SHIFT-ENTER.

    Hope this helps.

    Pete


  3. #3
    Sloth
    Guest

    RE: Multiple if criteria in one statement (if/sumproduct)

    you can use the WEEKDAY function so you don't need a range.

    =SUMPRODUCT(--(WEEKDAY(A1:A10)=2),B1:B10)

    "thekovinc" wrote:

    >
    > Hello. I am having a problem with extremely long formulas, and I was
    > wondering if there was any way to tidy them up a little bit.
    >
    > I have a set of data that has a column with the date it was entered
    > into the spreadsheet. I am currently trying to gather all the data
    > that was entered on Mondays.
    >
    > ie. The dates 38719, 38726, 38733, 38740, 38747, and 38754 (all the
    > Monday dates in 2006).
    >
    > I am currently using sumproduct formulas to determine the dollar value
    > of items entered on Mondays, are a certain type of item, and another
    > criteria. So my formula currently looks like:
    >
    > =sumproduct((Criteria 1)*(Criteria 2)*(Criteria 3), (Dollar Value))
    >
    > This works fine for a range of dates or a single date, but I am curious
    > if there is any way to be able to put the range of above Monday dates
    > into a single criteria field of the sumproduct formula. I would also
    > love to know if there is another way of doing this without using
    > sumproduct.
    >
    > Thanks much!
    >
    > Nick
    >
    >
    > --
    > thekovinc
    > ------------------------------------------------------------------------
    > thekovinc's Profile: http://www.excelforum.com/member.php...o&userid=29378
    > View this thread: http://www.excelforum.com/showthread...hreadid=513783
    >
    >


  4. #4
    Registered User
    Join Date
    12-05-2005
    Posts
    13
    Thanks a lot!

+ 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