+ Reply to Thread
Results 1 to 12 of 12

Excel 2007 : Lookup formula not seeing some numbers until they are re-entered

  1. #1
    Registered User
    Join Date
    07-14-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Lookup formula not seeing some numbers until they are re-entered

    Hello All,

    I am in the process of making my first lookup formula worksheet but I have run in to some problems.

    The purpose of this formula is to look up people in a particular room number and show them in a shortened list.

    This is done to 2 separate lists so I can compare / correct any differences.

    Unfortunately the formula does not recognize all instances of a room number in one of the lists.

    As you can see on the attached worksheet, only 2 of the 3 people in '134' show up. If I type '134' in to the room number again, the formula sees it, even though I am typing exactly the same thing as what is in there already!! I have checked, there are no spaces or anything, the original number is correct as far as I can see.

    Any idea why my lookup formula is failing to see some of these room numbers??


    Many thanks,
    Garry
    Attached Files Attached Files
    Last edited by GnGnG; 07-15-2012 at 07:19 PM. Reason: As requested

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Lookup formula not seeing some numbers until they are re-entered

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    Please don't upload pictures. None of us is inclined to recreate your data when you have a workbook available - see guidelines in the Rules area of this forum.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    07-14-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Lookup formula not seeing some numbers until they are re-entered

    Sorry, I have amended original post as asked.
    Last edited by GnGnG; 07-15-2012 at 12:01 PM.

  4. #4
    Registered User
    Join Date
    07-14-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Lookup formula not seeing some numbers until they are re-entered

    As the room numbers come from another, imported worksheet using: e.g. "=Sheet1!A13" I tried using the TRUNC function in case that was the problem after reading this article:

    http://support.microsoft.com/kb/315961

    However it did not work.

    The formula used was =TRUNC(Sheet1!A13,0) to get the Room numbers.

    The lookup formula still does not see some numbers.
    Last edited by GnGnG; 07-15-2012 at 03:41 PM. Reason: Clarification

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Lookup formula not seeing some numbers until they are re-entered

    The formula you have in J6 is:

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


    Change the 4:4 to 3:3 by dragging down from J5.

    The formula you have can also be shortened (unless you need it to work in pre-2007 versions of Excel) to this in J4 and dragged down:

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


    remember to confirm it with C+S+E instead of just Enter before dragging down

    Same goes for the K column formulas - K6 currently has wrong row ref

  6. #6
    Registered User
    Join Date
    07-14-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Lookup formula not seeing some numbers until they are re-entered

    Hi Cutter,

    Thanks very much for the good spots with the row reference errors.

    I have utilized your shorter formula, I have no need to be backwards compatible so shorter is better. I have attached the updated worksheet and I will change it in the top post too.

    Even with the shorter formula, I still have the annoying problem of some numbers not showing up. For example, typing 124 in the lookup box brings up 1 of 2 people in 124 from My List, and none of the 2 people in the Office's list. I am convinced it is something to do with formats, numbers/numbers as text/etc but after trying everything in this old post (link) I have not found the solution.

    The weordest thing is that typing 124 next to each person again (ie typing the same thing over the top) makes them appear. Obviously I don't want to do this every time as there are over 200 people in the master list.

    Garry
    Attached Files Attached Files
    Last edited by GnGnG; 07-15-2012 at 07:29 PM.

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Lookup formula not seeing some numbers until they are re-entered

    The "new" sample file (LookupCheckForm3) has the old formulas with the same row ref errors.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Lookup formula not seeing some numbers until they are re-entered

    for some reason some of the numbers in col a are text numbers,so they don't match try=ISNUMBER(A9) it says false
    to fix that put 0 in a spare cell copy
    select all the numbers in column a
    paste special
    add
    and just in case repeat in column e

    also the formula as pointed out seems to have skipped a row drag it down again from j4
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  9. #9
    Registered User
    Join Date
    07-14-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Lookup formula not seeing some numbers until they are re-entered

    Thanks Martin,

    Looks like that worked a treat.

    Is there any way this end result can be acheived in a formula? The end result I am after is that the user can copy & past the lists in (from other excel files) and do the checkup with this worksheet. Some of my colleagues are not overly Excel 'savvy' and things as complex as 'Paste Special' freak them out. Even though I have a button on the quicklaunch that does exactly that for them....

    I suppose I could make a macro button to do it though.

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Lookup formula not seeing some numbers until they are re-entered

    id do it like this just hide sheet1
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    07-14-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Lookup formula not seeing some numbers until they are re-entered

    Martin - is that just a tally of how many people in each room on sheet 1?

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Lookup formula not seeing some numbers until they are re-entered

    no it counts how may entries for each room countif($a$1:a1,a1) dragged down increments on each room as it finds it
    so
    200 1
    200 2
    201 1
    200 3
    203 1
    add the room number to it with a - in the middle (or separator of your choice!)
    a1&"-"&countif($a$1:a1,a1)
    200-1
    200-2
    201-1
    200-3
    203-1
    gives an unique reference to match against
    so now you can lookup by dragging down
    200&"-"&rows($a$1:a1) ie 200-1
    200&"-"&rows($a$1:a2) ie 200-2
    Last edited by martindwilson; 07-15-2012 at 08:48 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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