+ Reply to Thread
Results 1 to 4 of 4

Sum using named range as criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    07-15-2008
    Location
    germany
    Posts
    56

    Sum using named range as criteria

    Hi Experts,
    I am not new to Excel but I am currently not able to solve a prob.
    I have a set of data with countries in the column A and in the column B the values. These values should be summed based on countries present in a named range list.

    Could someone give me a hint directing toward the solution.
    I am using Windows Xp Prof. and Office 2003

    Thanks in advance
    Last edited by NBVC; 10-06-2011 at 07:48 AM.

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

    Re: Sum using named range as criteria

    If I understand correctly, say you have a list of countries in your named range, called Countries... and you have a list of countries in A1:A5 which may include the countries in the named range and may include others not in the range. You want to sum column B only if the countries in column A are in your named range, Countries. Yes?

    Try:

    =SUMPRODUCT(SUMIF(A2:A5,Countries,B2:B5))

    or

    =SUMPRODUCT(SUMIF(A2:A5;Countries;B2:B5))
    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
    07-15-2008
    Location
    germany
    Posts
    56

    Re: Sum using named range as criteria

    Quote Originally Posted by NBVC View Post
    If I understand correctly, say you have a list of countries in your named range, called Countries... and you have a list of countries in A1:A5 which may include the countries in the named range and may include others not in the range. You want to sum column B only if the countries in column A are in your named range, Countries. Yes?

    Try:

    =SUMPRODUCT(SUMIF(A2:A5,Countries,B2:B5))

    or

    =SUMPRODUCT(SUMIF(A2:A5;Countries;B2:B5))
    Thanks worked like a waterfall.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,286

    Re: Sum using named range as criteria

    Sounds like SUMIF or, if more complex requirements, SUMPRODUCT.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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