+ Reply to Thread
Results 1 to 11 of 11

Indirect function not returning correct value

  1. #1
    Registered User
    Join Date
    09-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2020
    Posts
    10

    Indirect function not returning correct value

    I am trying to use Indirect to return back a scoring value from the table below. When i enter a value into D37, it only returned the closes whole number and not the closest rating.

    For example if i entered in 12.80%(no rounding needed) it would return 1.0 and not 1.2



    Formula =VLOOKUP(D37,INDIRECT(C2),2)
    D37 = Data i want looked up
    C2 = Table Name

    (Table Below)
    Score Rating
    1.00% 1.00
    6.90% 1.10
    12.80% 1.20
    18.70% 1.30
    24.60% 1.40
    30.50% 1.50
    36.40% 1.60
    42.30% 1.70
    48.20% 1.80
    54.10% 1.90
    60.00% 2.00
    61.00% 2.10
    62.00% 2.20
    63.00% 2.30
    64.00% 2.40
    65.00% 2.50
    66.00% 2.60
    67.00% 2.70
    68.00% 2.80
    69.00% 2.90
    70.00% 3.00
    71.00% 3.10
    72.00% 3.20
    73.00% 3.30
    74.00% 3.40
    75.00% 3.50
    76.00% 3.60
    77.00% 3.70
    78.00% 3.80
    79.00% 3.90
    80.00% 4.00


    Thanks in advance for any help, if i can nail this down my project will be just about done!

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Indirect function not returning correct value

    You missed the True False part of VLOOKUP, which declares exact matches.

    =VLOOKUP(D37,INDIRECT(C2),2,0)

    or

    =VLOOKUP(D37,INDIRECT(C2),2,FALSE)

  3. #3
    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: Indirect function not returning correct value

    Hi,

    It works as expected for me. You'll need to upload your workbook so we can see the problem in context.
    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.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Indirect function not returning correct value

    Works OK for me.

    Do you get correct results for other lookup values?

    We may need to see the file to figure out what the problem is.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    09-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2020
    Posts
    10

    Re: Indirect function not returning correct value

    Quote Originally Posted by daffodil11 View Post
    You missed the True False part of VLOOKUP, which declares exact matches.

    =VLOOKUP(D37,INDIRECT(C2),2,0)

    or

    =VLOOKUP(D37,INDIRECT(C2),2,FALSE)
    If you leave it with out a 0, True or False it assumes True.


    Well this is weird, i tried it in another work book and you guys are right it is working, what could cause it not to work in this book?

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Indirect function not returning correct value

    I was able to get it to work fine as well.



    One possible problem is that True, the assumed value, is for non-exact matches.

    I always declare False or 0 for LOOKUP and MATCH, unless I'm just approximating statistics.

  7. #7
    Registered User
    Join Date
    09-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2020
    Posts
    10

    Re: Indirect function not returning correct value

    Quote Originally Posted by daffodil11 View Post
    The problem is that True, the assumed value, is for non-exact matches.

    I always declare False or 0 for LOOKUP and MATCH, unless I'm just approximately statistics.

    thanks for the follow up, however i got it to work with out it, i rebuilt the page ( moved the data over to a clean sheet and its working), i would like to find out why its not working on that one page but working on others....

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Indirect function not returning correct value

    Quote Originally Posted by iamskippy View Post
    i would like to find out why its not working on that one page but working on others....
    Difficult to say without actually seeing it.
    Can you attach a copy of the file?

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Indirect function not returning correct value

    As Richard noted, we would need to see the file so we can see the problem in context.

    On a side note, I won't download files >50kb in size.

  10. #10
    Registered User
    Join Date
    09-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2020
    Posts
    10

    Re: Indirect function not returning correct value

    Quote Originally Posted by Tony Valko View Post
    As Richard noted, we would need to see the file so we can see the problem in context.

    On a side note, I won't download files >50kb in size.
    I will Clean up that sheet, i think its small enough, never uploaded anything here before is there an attachment option i don't see it above, or am i going to have to move it to an external host?

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Indirect function not returning correct value

    When you reply click the "Go Advanced" button.

    Scroll down and you'll see Manage Attachments. Click that button and go from there.

    It's not exactly intuitive which is why I normally use an external host.

+ 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. Indirect function formula not correct
    By trobie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-12-2013, 08:30 AM
  2. Formula sometimes returning correct answer and sometimes returning 0
    By redimp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2010, 06:28 AM
  3. How to correct INDIRECT using VLOOKUP
    By holiday4ever in forum Excel General
    Replies: 3
    Last Post: 07-01-2009, 09:29 AM
  4. [SOLVED] MAX Function not returning correct value
    By Phil in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-28-2006, 05:20 PM
  5. What is the correct syntax for using VLOOKUP with INDIRECT ?
    By nsinha76 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-27-2005, 03:19 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