+ Reply to Thread
Results 1 to 11 of 11

Why is LOOKUP result changing - sometimes to wrong answer

  1. #1
    Registered User
    Join Date
    08-17-2019
    Location
    England
    MS-Off Ver
    Office 365 ProPlus 32-bit
    Posts
    5

    Why is LOOKUP result changing - sometimes to wrong answer

    Hi

    I'm trying to use the LOOKUP function featuring multiple criteria to return a value from the previous occasion where both criteria are TRUE

    Please have a look at the screen prints attached.

    On this occassion there is just 1 TeamID running through the spreadsheet. But sometimes there are multiple teams.
    So I've put in a LOOKUP function with two criteria, one of them being TeamID

    Sometimes the formula gives the right answer, other times it gives the wrong answer


    Why is this? It's worrying that the answer changes when the formula and inputs are the same.

    Calculation mode is set to Automatic and ErrorChecking doesn't say that there are any circular references.
    Another thing I've noticed is that sometimes the answer changes purely as a result of me filtering column(s).


    Update
    I've just created an identical scenario on a fresh spreadsheet on a different computer and even then I'm seeing the same problem.
    I've uploaded the spreadsheet so you can see. The cell highlighted yellow is the one giving the wrong result.
    Also notice that if you go through Evaluate Formula, it comes up with a different answer (the correct answer) to the answer displayed in the cell.


    Thanks
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by ABV20.18; 08-17-2019 at 06:53 PM.

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

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    Hi and welcome
    although we value privacy as much as anyone else, it could be important that members have a rough idea of your location. You might in the future post questions which are bound to your regional settings.
    So, please update your profile to something more precise then "Earth" ( country will suffice, no need to be more precise).
    Thank you for helping us to help you

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    What exactly is the formula supposed to do?

    In your attachment it is returning what you are telling it to return in the formula (the last value in F5:F7 where the ID matches and G5:G7 is TRUE, i.e. F7 (FALSE).

    Explain in WORDS what you are wanting it to do.

    To be clear: the formula is working perfectly, so it's what you are expecting it to do that is awry, and nowhere have you yet told us that. What result are you expecting in H8 and WHY?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    08-17-2019
    Location
    England
    MS-Off Ver
    Office 365 ProPlus 32-bit
    Posts
    5

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    Hi AliGW

    Did you not find that when you first opened the file it was showing TRUE in the yellow cell.........whereas it should be showing FALSE.
    Even when I open the attachment now, it shows TRUE in the yellow cell
    It only changes to FALSE if I go into the cell and press Enter

    The formula in the yellow cell is intended to tell me:
    Prior to row 8, Did the last match in which Team 123456 received a card, feature a red card?

    The answer here should be FALSE
    However, sometimes the spreadsheet is returning TRUE in that cell (as you see when you first open that file)
    It only changes to the correct answer if you go into the cell and press enter
    Annoying how Evaluate Formula is showing the correct answer whilst the worksheet is displaying the wrong answer


    Here are some screen shots showing Evaluate Formula starting part way through.
    Initially it shows the correct answer (FALSE)
    Then finally it jumps to the wrong answer (TRUE)
    Attached Images Attached Images

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    Only for a second as the app loads. Once Excel is fully loaded the result is correct. I don't have to go to the cell and force a refresh.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    Have you tried running a repair on Excel?

    EDIT: I have just opened your workbook again and this time it didn't put itself right until I placed the cursor in the cell and pressed ENTER. Hmmmm ....

    EDIT AGAIN: So I tried again, and this time it put itself right as soon as I clicked on Enable Editing. Curiouser and curiouser ...
    Last edited by AliGW; 08-18-2019 at 01:22 PM.

  7. #7
    Registered User
    Join Date
    08-17-2019
    Location
    England
    MS-Off Ver
    Office 365 ProPlus 32-bit
    Posts
    5

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    Interesting that you're now seeing the strange behaviour too


    Do you mean a repair of the file or of the application?

    If you mean the file
    I've now tried that and it doesn't make a difference. I wouldn't expect it to have done because the problem was showing when I setup the formula on a simple, fresh file.


    If you mean the application
    I wouldn't want to try anything like that on my work computer

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    No, scratch that. It's very odd, and I can't get it to behave consistently. Mostly it corrects itself before I intervene, but on ONE occasion it didn't. Weird!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    I have tried several times more and I can no longer replicate the issue - it resolves itself as soon as I click on Enable Editing. Sorry.

  10. #10
    Registered User
    Join Date
    08-17-2019
    Location
    England
    MS-Off Ver
    Office 365 ProPlus 32-bit
    Posts
    5

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    Thanks for trying AliGW

    I'm nervous now about using Lookup so looks like tomorrow will be a busy day replacing lookup functions with alternatives and possibly need more helper columns

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Why is LOOKUP result changing - sometimes to wrong answer

    I am not convinced that this has anything at all to do with the function used. It will be interesting to see how you get on.

+ 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. sum answer is wrong ?
    By digga in forum Excel General
    Replies: 4
    Last Post: 05-17-2019, 04:53 PM
  2. [SOLVED] returning answer based on matching cells then changing answer
    By swfarm in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2019, 10:05 AM
  3. INT() gives wrong answer
    By Rony6ble in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-20-2018, 12:24 PM
  4. [SOLVED] Code result wrong but formula correct result
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-11-2014, 12:26 PM
  5. [SOLVED] VLOOKUP gives wrong result with TRUE for range-lookup
    By drfarmkid in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2013, 06:54 PM
  6. right answer has value 1,wrong answer has value 0
    By zeroist in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-10-2012, 10:45 AM
  7. Wrong result using v-lookup
    By Marvo in forum Excel General
    Replies: 7
    Last Post: 01-12-2012, 12:57 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