+ Reply to Thread
Results 1 to 9 of 9

SUMIF error when no data exist

  1. #1
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    SUMIF error when no data exist

    This might be a little hard to explain but what I am trying to do is Sum UP Values on a Worksheet and average what we sell for the month and use it as a percentage to base what we might sell that month based off of History. The problem is some Items have no history. For the lines that have no history I would like for it to do a Vlookup an the sheet called "Weighted Table" and times that percentage by Column "Y". I just don't know how to make it perform the vlookup when it doesn't find the Part Number in the list? Any help would be greatly appreciated. Line 23 (Apple21) is an item that has no history so it creates the dreaded #DIV/0! error. I have attached a dummy sample of the issue. Thanks,
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: SUMIF error when no data exist

    Nest your formula in IFERROR and use vlookup in value if error part.

    So...
    =IFERROR(YOUR FORMULA,$Y23*VLOOKUP(TEXT(Worksheet!B$1,"mmm"),'Weighted Table'!$A$1:$B$12,2,0))
    Last edited by CK76; 10-30-2017 at 10:06 AM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: SUMIF error when no data exist

    You don't need all SUMIFS when you have total in dana sheet.

    Try this in B23:

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

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: SUMIF error when no data exist

    In B2

    =IFERROR(ROUND(SUMPRODUCT((Data!$B$2:$B$197=Worksheet!$A2)*(Data!D$2:D$197))/(SUMPRODUCT((Data!$B$2:$B$197=Worksheet!$A2)*(Data!$D$2:$O$197)))*$Y2,0),VLOOKUP(TEXT(B$1,"mmm"),'Weighted Table'!$A$1:$B$12,2,0)*100)

    copy across and down
    Attached Files Attached Files

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: SUMIF error when no data exist

    How about (for cell B2 and copy down/right):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: SUMIF error when no data exist

    Try in B2:
    Please Login or Register  to view this content.
    Copy down and accross.
    Quang PT

  7. #7
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Re: SUMIF error when no data exist

    bebo021999, that seems to work. I made the "Y" absolute. The only problem is how do I make it round the result on the error?

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: SUMIF error when no data exist

    Just moving it out:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Re: SUMIF error when no data exist

    Thank you to all that helped!!! Bebe021999 that worked like a charm!!!

+ 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. Getting error User input data error. Sheet name requested does not exist.
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2016, 08:32 AM
  2. [SOLVED] VBA help needed to capture Error and Remove Pivot if error exist else resume
    By Tescatlipoca in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-18-2014, 05:46 PM
  3. [SOLVED] SUMIF(By Date) - SUMIF(By Date)= #Value Error From Linked Data
    By Dragunov in forum Excel General
    Replies: 2
    Last Post: 05-17-2012, 11:22 AM
  4. Replies: 6
    Last Post: 04-09-2012, 02:26 PM
  5. Replies: 1
    Last Post: 01-29-2012, 01:19 PM
  6. SumIf 2 Variables Exist
    By shelanp in forum Excel General
    Replies: 5
    Last Post: 06-03-2011, 09:54 AM
  7. Replies: 4
    Last Post: 05-11-2011, 01:01 AM

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