+ Reply to Thread
Results 1 to 8 of 8

Trying to merge two formulas with no luck

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    Baton Rouge, LA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Trying to merge two formulas with no luck

    Trying to merge these two formulas to get specific results
    =SUMPRODUCT(--(WEEKDAY($B2:$B1000,2)=1),$G2:$G1000) this gives me total for a day
    =SUMIF($A:$A,"OPSA",$G:$G) this gives me total per dept(OPSA)

    i need total per dept for each day
    Attached Files Attached Files
    Last edited by jonahbosworth; 04-16-2013 at 01:09 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Trying to merge two formulas with no luck

    Assuming you have the department name in K1

    =SUMPRODUCT(--(WEEKDAY($B2:$B1000,2)=1),--($A2:$A1000= $K$1), $G2:$G1000)

    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Trying to merge two formulas with no luck

    try

    =SUMPRODUCT((WEEKDAY($B2:$B1000;2)=1)*(A2:A1000="OPSA")*($G2:$G1000))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    04-15-2013
    Location
    Baton Rouge, LA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Trying to merge two formulas with no luck

    Chem, gives my a false statement, and Fotis, gives me an value error

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Trying to merge two formulas with no luck

    Why? ..................
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-15-2013
    Location
    Baton Rouge, LA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Trying to merge two formulas with no luck

    Havent a clue, tryin go figure that out now

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Trying to merge two formulas with no luck

    Did you put something in K1?

    =SUMPRODUCT(--(WEEKDAY($B2:$B1000,2)=1),--($A2:$A1000= $K$1), $G2:$G1000)

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Trying to merge two formulas with no luck

    Quote Originally Posted by ChemistB View Post
    Did you put something in K1?

    =SUMPRODUCT(--(WEEKDAY($B2:$B1000,2)=1),--($A2:$A1000= $K$1), $G2:$G1000)
    I did in my sample sheet

+ 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