+ Reply to Thread
Results 1 to 4 of 4

Calculate difference if satisfy multiple conditions

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2003
    Posts
    6

    Calculate difference if satisfy multiple conditions

    Would be grateful for advice. Its probably pretty simple, but I don't seem to be able to get it. I've tried sumifs, if(isnumber(find...) etc but still not working

    As an example, assume I have shops in three locations (e.g. Spain, Germany and France) in column B, which are part of a fixed drop-down list. The data I enter is theoretical revenue for each location on a daily basis (columns D & E, summed in column F) and actual revenue (column G) which I enter for a specific period earned (column H & I).

    I want to first of all sum column F with two conditions (same location and same period range) and then calculate the difference against column G.

    See attached excel sheet as example. Thank you very much.

    Example.xlsx
    Last edited by hparnian; 08-27-2012 at 02:05 PM.

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

    Re: Calculate difference if satisfy multiple conditions

    Do you mean?

    =G9-SUMIFS(F2:F9,B2:B9,B9,A2:A9,">="&H9,A2:A9,"<="&I9)
    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
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Calculate difference if satisfy multiple conditions

    try this one....

    =G9-SUMPRODUCT((B2:B9=B9)*(A2:A9<=I9)*(A2:A9>=H9)*(F2:F9))

  4. #4
    Registered User
    Join Date
    08-21-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Calculate difference if satisfy multiple conditions

    Thank you both for the prompt reply. Both options worked. The solution was much more simple than I thought. Shouldn't try to complicate it so much. Thanks again.
    Last edited by hparnian; 08-27-2012 at 02:05 PM.

+ 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