+ Reply to Thread
Results 1 to 5 of 5

nested formulas do not evaluate when cell data is manipulated

  1. #1
    Registered User
    Join Date
    08-29-2018
    Location
    Midwest, USA
    MS-Off Ver
    2010
    Posts
    2

    nested formulas do not evaluate when cell data is manipulated

    I have run into this problem a few times, possibly a problem with Vlookup or formulas.

    A2 = XX-XXXXX

    =IFERROR(VLOOKUP(A2,Sheet2'!$B:$E,4,FALSE),VLOOKUP(SUBSTITUTE(A2,"-",""),Sheet2'!$B:$E,4,FALSE))

    Trying to search for a value without a hyphen in the event it doesn't work with the hyphen.
    When I try and nest a substitute formula or other such formula it would evaluate with F9 properly
    but then the Vlookup would not evaluate the reference to the changed value of A2.... "XXXXXX"

    Result N/A

    note A2 typed in with out the hyphen does work in this vlookup.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: nested formulas do not evaluate when cell data is manipulated

    Do the Xs represent numbers? If so, you probably need to convert the result of the SUBSTITUTE to a number like this:

    =IFERROR(VLOOKUP(A2,Sheet2'!$B:$E,4,FALSE),VLOOKUP(SUBSTITUTE(A2,"-","")+0,Sheet2'!$B:$E,4,FALSE))
    Rory

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: nested formulas do not evaluate when cell data is manipulated

    The obvious is you are missing/including '

    =IFERROR(VLOOKUP(A2,Sheet2!$B:$E,4,FALSE),VLOOKUP(SUBSTITUTE(A2,"-",""),Sheet2!$B:$E,4,FALSE))

    may work it does on my spreadsheet

    however you really need to attach a sample with the error if that fails

  4. #4
    Registered User
    Join Date
    08-29-2018
    Location
    Midwest, USA
    MS-Off Ver
    2010
    Posts
    2

    Re: nested formulas do not evaluate when cell data is manipulated

    That, worked thank you! Now why does that work?

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: nested formulas do not evaluate when cell data is manipulated

    SUBSTITUTE returns a text value. If the numbers are stored as numbers in the lookup table, the formula won't find a match since "1" is not the same as 1 to VLOOKUP. Adding 0 will coerce it to a real number value.

+ 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. Nested Application.Evaluate not working
    By kaktus018 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-22-2016, 04:18 PM
  2. Nested IF statement using CountA to evaluate Text
    By david systems in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2013, 02:43 PM
  3. Replies: 1
    Last Post: 06-30-2013, 02:59 PM
  4. Replies: 2
    Last Post: 05-21-2013, 12:45 PM
  5. View cell info instead of formulas / Evaluate formulas
    By whitetea in forum Excel General
    Replies: 2
    Last Post: 05-20-2012, 10:08 AM
  6. manipulated data
    By shashi80 in forum Excel General
    Replies: 3
    Last Post: 06-30-2008, 11:21 AM
  7. Nested IF to evaluate street addresses
    By ManosS in forum Excel General
    Replies: 6
    Last Post: 03-16-2006, 11:10 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