+ Reply to Thread
Results 1 to 5 of 5

Array formula with a few conditions

  1. #1
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    126

    Array formula with a few conditions

    Hi,

    I am trying to find out how many "small" caravans a salesman has sold from a spreadhseet of sales. The different sizes classed as small are 10,11,12,13 and then obviously they are all initiled with the sales person who sold them, as below "JD"

    Please Login or Register  to view this content.
    The above is my effort, an array formula, not working properly. Any help would be greatly appreciated.

    Thanks,
    Simon

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Array formula with a few conditions

    Depending on your version of XL

    Pre XL2007
    =SUMPRODUCT(--(O17:O154="JD"),--(ISNUMBER(MATCH(G17:G154,{10,11,12,13},0))))
    or
    =SUMPRODUCT(--(O17:O154="JD"),--(G17:G154>=10),--(G17:G154<=13))

    XL2007
    =COUNTIFS($O$17:$O$154,"JD",$G$17:$G$154,">=10",$G$17:$G$154,"<=13")

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,982

    Re: Array formula with a few conditions

    Or:
    =SUMPRODUCT((O17:O154="JD")*(G17:G154={10,11,12,13}))
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Array formula with a few conditions

    "Or" indeed... *much* better

    (assuming COUNTIFS not viable of course )

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,982

    Re: Array formula with a few conditions

    Not better, just different.
    And only works with one array constant.

+ 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