+ Reply to Thread
Results 1 to 3 of 3

Using VLOOKUP to calculate the sum of matching values in an array?

  1. #1
    Registered User
    Join Date
    06-30-2007
    Posts
    51

    Using VLOOKUP to calculate the sum of matching values in an array?

    I have a vast array of values split by Year and then sub-split by Type.

    For example...

    2005
    Type 1 500
    Type 2 250
    Type 3 200

    2006
    Type 1 475
    Type 2 400
    Type 3 300

    2007
    Type 1 800
    Type 2 700
    Type 3 950

    What I would like to do is, rather than =SUM(A1+A6+A11 etc etc) is to use VLOOKUP to calculate the grand total of each Type. Is there a way to incorporate the SUM function into a VLOOKUP formula?

    Thanks
    Last edited by carlosbourn; 03-04-2009 at 07:59 AM.

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

    Re: Using VLOOKUP to calculate the sum of matching values in an array?

    Assuming you're not filtering on basis of Year also then just use a SUMIF:

    =SUMIF(A:A,"Type 1",B:B)

  3. #3
    Registered User
    Join Date
    06-30-2007
    Posts
    51

    Re: Using VLOOKUP to calculate the sum of matching values in an array?

    Brilliant - thanks Mr Donkey

+ 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