+ Reply to Thread
Results 1 to 3 of 3

SUMPRODUCT with cell reference to named range

  1. #1
    Registered User
    Join Date
    11-20-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

    SUMPRODUCT with cell reference to named range

    I have the following formula in Sheet1 which works fine:

    =SUMPRODUCT((Employee=John)*(Sales_2009)*(Product=Bricks))

    Sales_2009 is a named range in column D of Sheet2
    Column C in Sheet2 has another named range called Sales_2008

    Is it possible to amend the SUMPRODUCT formula as follows:

    =SUMPRODUCT((Employee=John)*(B2)*(Product=ABC))

    which gives the user the option of entering either Sales_2009 or Sales_2008 in cell B2 of Sheet1 ?
    Last edited by ITC; 11-21-2010 at 04:52 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: SUMPRODUCT with cell reference to named range

    =SUMPRODUCT((employee="john")*(product="bricks")*(INDIRECT(b2))) where b2 holds the range name for sales
    Last edited by Paul; 11-21-2010 at 12:34 AM. Reason: Changed "D1" to "B2" since the formula referenced B2
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    11-20-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: SUMPRODUCT with cell reference to named range

    Thanks for your help - that worked a treat.

+ 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