+ Reply to Thread
Results 1 to 4 of 4

#value error when using a sum function that includes vlookup cell references

  1. #1
    Registered User
    Join Date
    01-09-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    #value error when using a sum function that includes vlookup cell references

    Hi all

    I'm using this formula:

    =SUM(VLOOKUP((B82&C82),wkone,4,0),VLOOKUP((B82&C82),wktwo,4,0),VLOOKUP((B82&C82),wkthree,4,0),VLOOKUP((B82&C82),wkfour,4,0),VLOOKUP((B82&C82),wkfive,4,0))

    The VLOOKUP function is working fine when there are numerical values in the cells I'm referencing but when there is text in any of the cells, I get a #VALUE error.

    I've done a little research and apparently the SUM function is meant to help avoid those errors as opposed to using a simple arithmetic arguments (=a2+b2) but I can't find anything about the use of functions within the sum itself.

    I need the formula to ignore text entries. How can I go about doing that?

    Appreciate any help!

    Cheers

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,622

    Re: #value error when using a sum function that includes vlookup cell references

    Please post a sample sheet, your use of VLOOKUP is awkward

  3. #3
    Registered User
    Join Date
    01-09-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: #value error when using a sum function that includes vlookup cell references

    Hi Pepe

    In the tables that I'm referencing with the VLOOKUP(wkone, wktwo, etc, all on different sheets) I've concatenated the second and third columns in the table into the first column, then I do a vlookup for the concatenated value in the first column of the table, hence the use of '&'.

    The VLOOKUP is working fine when I have numbers or empty cells so, despite not being entirely elegant or even the easiest way to do this, that isn't my issue. My issue is that when I have text in any of the cells I'm referencing, I get the #VALUE error so I need to find a way to add the numerical values and ignore the text.

    I've attached the workbook. The errors are on the worksheet called 'Daily' and are highlighted in yellow to make it easier for you to find.

    Thanks for your help, it's much appreciated!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-09-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: #value error when using a sum function that includes vlookup cell references

    Hi

    I had some help and have changed my formula slightly and it works just fine:

    =SUM(CHOOSE({1,2,3,4,5},VLOOKUP((B82&C82),wkone,4,0),VLOOKUP((B82&C82),wktwo,4,0),VLOOKUP((B82&C82),wkthree,4,0),VLOOKUP((B82&C82),wkfour,4,0),VLOOKUP((B82&C82),wkfive,4,0)))

    Thanks for looking at it anyway, it's much appreciated!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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