+ Reply to Thread
Results 1 to 3 of 3

Can I use SUMPRODUCT with IF & AND formula?

  1. #1
    Registered User
    Join Date
    02-28-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Can I use SUMPRODUCT with IF & AND formula?

    Hi,

    Hopefully one of you Excel gurus can help with a problem I am having. I wanted to know if it was possible to use the sumproduct formula using If and And statements.

    The end goal is to look up an advertiser, site, and fiscal quarter. In the data set I have spend but it is designated as actual or forecasted. I want the formula to be able to look up if the spend is actual for Q1, give me that spend, if not, give me the forecasted spend. For some reason, the formula is not working, no mater what I do. Is it possible that I can not combine a sumproduct formula with an IF and And statement?

    This is the formual i was trying to play with: IF(MONTH="Actual 1/1/2012" and "Actual 2/1/2012" and "Actual 3/1/2012", SUMPRODUCT((Client=$A2)*(Advertiser=$A$1)*(Quarter=B$1)*Spend),(MONTH="Forecasted 1/1/2012" and "Forecasted 2/1/2012" and "Forecasted 3/1/2012", SUMPRODUCT((Client=$A2)*(Advertiser=$A$1)*(Quarter=B$1)*Spend)))

    Attached is a dummy file: Sumproduct help.xlsx

    Any help would be greatly appreciated!

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

    Re: Can I use SUMPRODUCT with IF & AND formula?

    I am not sure I fully understand, but first thing is your named Spent range is not same size as other ranges... fix that and you will see results in the matrix.

    So, if at least one of the ACTUALs for the quarter is numeric, just add the ACtuals, else the Forecasts? Is that right?
    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
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Can I use SUMPRODUCT with IF & AND formula?

    Perhaps better with SUMIFS.....

    You need to define Spend range so that it's the same size as the other ranges, then try this formula in B2 copied across and down for the forecasted values

    =SUMIFS(Spend,Client,$A2,Advertiser,$A$1,Quarter,B$1,Month,"Forecasted*")

    You can use the same syntax for "Actual"
    Audere est facere

+ 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.6.0 RC 1