+ Reply to Thread
Results 1 to 6 of 6

Summing the results of multiple VLOOKUP's

  1. #1
    Registered User
    Join Date
    05-22-2015
    Location
    lodon
    MS-Off Ver
    2013
    Posts
    13

    Thumbs up Summing the results of multiple VLOOKUP's

    Hi All,

    Im having a bit of trouble here. Im trying to sum the results of different VLOOKUP's, the probalem im having is i dont think excel is realsing the results of the vlookups are numbers as they are the result of a formula themselves.

    So im trying a formula like this:

    =(VLOOKUP(D4,G4:I203,2,FALSE)-(VLOOKUP(D4,D4:F203,2,FALSE)))

    But the cells the VLOOKUP on its own would bring is the result of a formula itself.

    Any help would be great!

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Summing the results of multiple VLOOKUP's

    Your syntax looks correct, and the fact that the lookup value is the result of a function should not matter (see example).

    In order to debug this, we will probably need a more detailed description of what is going on. What error or wrong answer are you getting from this? Are you certain the values are numbers (and not numbers stored as text)? Recognize that functions like LEFT(), MID(), RIGHT() and other text functions return text strings, even if the result looks like a number.

    A sample spreadsheet may be invaluable to help explain your problem.
    Attached Files Attached Files
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    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
    44,440

    Re: Summing the results of multiple VLOOKUP's

    In the absence of any data (that is, a sample workbook), your guess is as good as anyone's.

    Note you have an excess of brackets to no purpose.

    Regards, TMS
    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


  4. #4
    Registered User
    Join Date
    05-22-2015
    Location
    lodon
    MS-Off Ver
    2013
    Posts
    13

    Re: Summing the results of multiple VLOOKUP's

    Ah yes, it seems to be a formatting issue, thanks.

    however now i am trying to average values that again are the result on formula. I can add them just using the + symbol but if i use the average function or sum it gives me a #DIV/0! error, though none of the numbers are 0 (though they are formula results)

    Any ideas!

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Summing the results of multiple VLOOKUP's

    As noted in the help files (https://support.office.com/en-us/art...__toc309306716 ), the average and sum functions ignore text. This includes "numbers stored as text" You haven't said anything about the formulas used to generate these values, but if these formulas generate them as "text strings" (examples: LEFT(), RIGHT(), MID() functions -- follow above link to also see a list of Excel's text functions), the the average() and SUM() functions will ignore them -- yielding a #Div/0# error if all of the values are "numbers stored as text".

    If this is the case, you need to modify your text formulas to force them to return numbers. This can be done using the =VALUE() function or by adding 0 =text function +0 or by multiplying by 1 or other suitable strategy.

  6. #6
    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
    44,440

    Re: Summing the results of multiple VLOOKUP's

    You're welcome. Thanks for the rep.

    Any ideas!
    Yes, upload some data so we can see what you're working with. And please, don't post numbers in the thread, post a sample workbook.

    Let's say you had 12345 in a cell as a number. =LEFT($A$1,3), =MID($A$1,2,3), =RIGHT($A$1,3), would all return text strings

    =--LEFT($A$1,3), =--MID($A$1,2,3), =--RIGHT($A$1,3), would all return numbers
    =LEFT($A$1,3)+0, =MID($A$1,2,3)+0, =RIGHT($A$1,3)+0, would all return numbers
    =LEFT($A$1,3)-0, =MID($A$1,2,3)-0, =RIGHT($A$1,3)-0, would all return numbers
    =LEFT($A$1,3)*1, =MID($A$1,2,3)*1, =RIGHT($A$1,3)*1, would all return numbers
    =LEFT($A$1,3)/1, =MID($A$1,2,3)/1, =RIGHT($A$1,3)/1, would all return numbers


    Regards, TMS

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] using Vlookup with multiple results and averaging the results.
    By xatomicx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2015, 10:19 AM
  2. Summing across multiple sheets by specific name, VLOOKUP?
    By polyrhythm in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-08-2014, 08:43 AM
  3. [SOLVED] Vlookup & summing multiple columns.
    By Gallinski in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-20-2013, 03:26 AM
  4. Summing Vlookup for multiple accounts
    By wilson32294 in forum Excel General
    Replies: 3
    Last Post: 01-31-2012, 03:41 PM
  5. Alternative to summing multiple vlookup formulas?
    By smuacc in forum Excel General
    Replies: 3
    Last Post: 11-24-2011, 12:21 PM
  6. Excel 2007 : Summing multiple IF(ISNA(Vlookup))
    By jseufert in forum Excel General
    Replies: 1
    Last Post: 09-07-2011, 12:42 PM
  7. Matching multiple columns, summing multiple results
    By DamienC in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-09-2008, 09:36 AM

Tags for this Thread

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