+ Reply to Thread
Results 1 to 9 of 9

How to return a blank result when using SUM(VLOOKUP formula??

  1. #1
    Registered User
    Join Date
    02-25-2014
    Location
    Brisbane
    MS-Off Ver
    Excel 2000
    Posts
    78

    Exclamation How to return a blank result when using SUM(VLOOKUP formula??

    I am using the following forumla

    =SUM(VLOOKUP(B6,'Current Stock'!$A$2:$E$438,{2,3,4},FALSE))

    It works but when it finds there is no match it returns #N/A. I tried the following but Excel did not like it.

    =IF(ISERROR(SUM(VLOOKUP(B6,'Current Stock'!$A$2:$E$438,{2,3,4},FALSE)),"",SUM(VLOOKUP(B6,'Current Stock'!$A$2:$E$438,{2,3,4},FALSE))

    But this doesn't work either. I have also used =IF(ISNA and this doesn't work. I have it working with a different formula

    =IF(ISERROR(VLOOKUP(B6,'Current Stock'!A:E,5,FALSE)),"",VLOOKUP(B6,'Current Stock'!A:E,5,FALSE))

    This works and returns a blank cell but i just can't get it with the SUM(VLOOKUP?

    ANy help will be greatly appreciated
    Last edited by Shannon561; 05-13-2014 at 03:39 AM.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: How to return a blank result when using SUM(VLOOKUP formula??

    try using
    =SUMproduct(iferror(VLOOKUP(B6,'Current Stock'!$A$2:$E$438,{2,3,4},FALSE),0))

    this will work in 2007. if using prior version use Saarang's solution
    Last edited by hemesh; 05-13-2014 at 02:24 AM.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: How to return a blank result when using SUM(VLOOKUP formula??

    If you are using Excel 2007 or later, try :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you are using version prior to Excel 2007, try :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

  4. #4
    Registered User
    Join Date
    02-25-2014
    Location
    Brisbane
    MS-Off Ver
    Excel 2000
    Posts
    78

    Re: How to return a blank result when using SUM(VLOOKUP formula??

    I am using Excel 2000 (Work is too cheap)!

    I tried Saaraang84's code and it didn't like it. It Highlighted the 0 (see below)

    =IF(ISERROR(SUM(VLOOKUP(B6,'Current Stock'!$A$2:$E$438,{2,3,4},FALSE)),0,SUM(VLOOKUP(B6,'Current Stock'!$A$2:$E$438,{2,3,4},FALSE))

  5. #5
    Registered User
    Join Date
    02-25-2014
    Location
    Brisbane
    MS-Off Ver
    Excel 2000
    Posts
    78

    Re: How to return a blank result when using SUM(VLOOKUP formula??

    Thank you both for the fast reply.

    I did try both codes as well neither worked


  6. #6
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: How to return a blank result when using SUM(VLOOKUP formula??

    Apologies Shannon, the nesting of brackets in my 2nd formula was wrong.

    Corrrected formula below :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-25-2014
    Location
    Brisbane
    MS-Off Ver
    Excel 2000
    Posts
    78

    Re: How to return a blank result when using SUM(VLOOKUP formula??

    That has worked perfectly!

    Thank you very much for your help i really appreciate it!

  8. #8
    Registered User
    Join Date
    02-25-2014
    Location
    Brisbane
    MS-Off Ver
    Excel 2000
    Posts
    78

    Re: How to return a blank result when using SUM(VLOOKUP formula??

    I marked this as solved a little early!

    So the formula you gave me worked in the sense that it displayed a blank cell when needed.

    But now the formula is not adding up the three columns from the stock report?

    =IF(ISERROR(SUM(VLOOKUP(B6,'Current Stock'!A:G,{3,4,5},FALSE))),0,SUM(VLOOKUP(B6,'Current Stock'!A:G,{3,4,5},FALSE)))

    It is only returning the first column as the result in stead of adding columns 3 4 and 5?

    Sorry to be a pain!

  9. #9
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: How to return a blank result when using SUM(VLOOKUP formula??

    Can u post a workbook with sample data?

+ 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. Code for VBA VLookup result blank if column index number is blank
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-06-2014, 05:55 PM
  2. [SOLVED] Need formula to return blank instead of #N/A when source cell is blank, using VLOOKUP
    By TMB1234 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 07:16 PM
  3. Replies: 3
    Last Post: 04-15-2010, 08:36 PM
  4. Replies: 3
    Last Post: 08-13-2008, 08:25 AM
  5. [SOLVED] Return a text string when the result of VLOOKUP formula is #N/A
    By jeremy nickels in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-04-2006, 12:30 PM

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