+ Reply to Thread
Results 1 to 6 of 6

ISERROR partially working

  1. #1
    Registered User
    Join Date
    06-30-2010
    Location
    swindon, england
    MS-Off Ver
    Office 365
    Posts
    90

    ISERROR partially working

    I am trying to use an ISERROR formula to stop a VLOOKUP returning a #VALUE.

    I'm trying to create a ranking table, which shows how many places a customer has moved up or down in a revenue chart month on month.
    The data I am using is taken from a pivot table, and some months, some customers have no sales data, so there is no value for my formula to calculate with.

    The ISERROR solution I tried to use removes the #VALUE, if I enter a number in the blank cell, and then delete that number. But it won't work straight away if there is a blank cell.

    Please could someone help?

    Small example spreadsheet attached.
    Attached Files Attached Files

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: ISERROR partially working

    Try this in F2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-30-2010
    Location
    swindon, england
    MS-Off Ver
    Office 365
    Posts
    90

    Re: ISERROR partially working

    Thanks very much, that works perfectly.
    I should have posted on here ages ago. I've been staring at the spreadsheet for god knows how long.

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: ISERROR partially working

    Column F starts off with ISNA tests and then changes to ISERROR in F4 ????????????
    Surely these both can't be correct?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Registered User
    Join Date
    06-30-2010
    Location
    swindon, england
    MS-Off Ver
    Office 365
    Posts
    90

    Re: ISERROR partially working

    Me messing about with the formulas in the spreadsheet I'd copied this example from. Hadn't realised I'd not copied the formula.

  6. #6
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: ISERROR partially working

    Quote Originally Posted by jimbokeep View Post
    The ISERROR solution I tried to use removes the #VALUE, if I enter a number in the blank cell, and then delete that number. But it won't work straight away if there is a blank cell.
    Your formula is:

    Please Login or Register  to view this content.
    First, VLOOKUP always succeeds because obviously A8 can be found in the first column of the lookup range, which is column A; namely, at least in row 8. So ISERROR always returns FALSE.

    Second, the problem is: the cells that appear blank in columns C and E contain the null string ("") due the formula of the form:

    =IF(ISNA(RANK(B8,$B$2:$B$14,0)),"",RANK(B8,$B$2:$B$14,0))

    Thus, the formula is effectively ="" - "". That results in a #VALUE error because we cannot use non-numeric text in arithmetic expressions.

    If you are saving the file as ".xlsx" (not ".xls"), you can write the following:

    Please Login or Register  to view this content.
    Alternatively (works in a ".xls" file as well):

    Please Login or Register  to view this content.
    Alternatively, I wonder if the following works:

    =IF(OR(C8="", E8=""), "", C8 - E8)

    It is unclear to me why you are using VLOOKUP, which ostensibly matches the same row as the lookup value (A8) -- unless the value in A8 might also occur in an earlier row, and your intent is to find the first row with that value. [PS.... But I assume that is not likely, since you are searching a pivot table.]

    Aside.... Note the subtle change from A:C to $A$2:$C$1000. Generally, it is imprudent to use whole-column references, especially if the lookup might fail, because that might cause Excel to process all 1+ million rows in a ".xlsx" file. Arguably, it is okay in this particular case because, as noted, VLOOKUP always succeeds. But it is a bad habit. Instead, choose a limited range that allows for reasonable growth in the data. I assume you will never have more than 1000 rows of data. You might prefer 10,000 or 100,000 or anything in between or beyond. But I suspect that 1+ million is unlikely.
    Last edited by joeu2004; 11-18-2016 at 12:06 PM. Reason: PS

+ 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. Conditional formatting working partially
    By fthevenin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-28-2016, 09:46 AM
  2. save as macro partially working
    By tigergutt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-05-2016, 07:12 AM
  3. [SOLVED] Calculation partially not working
    By WilliamWelch in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-22-2015, 05:27 PM
  4. [SOLVED] Code only partially working
    By Saeber4777 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-11-2014, 10:53 PM
  5. Macro only partially working
    By LilSisKin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-26-2013, 06:04 PM
  6. Nested IF formula partially not working
    By Mattacola in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-14-2012, 03:21 PM
  7. VLOOKUP partially working
    By ih8xc in forum Excel General
    Replies: 4
    Last Post: 05-03-2011, 08:32 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