+ Reply to Thread
Results 1 to 3 of 3

INDEX Issue

  1. #1
    Registered User
    Join Date
    01-22-2025
    Location
    lexington, ky
    MS-Off Ver
    365
    Posts
    1

    INDEX Issue

    I have an index function that is looking for values in "CIVIL SET" that fall within the range between cells J and K.

    It works perfectly until it reaches a value greater than 93+00. If I modify the ranges it will generate more values, but the values that are entered are the real values I need to work with.

    Additionally, the last instance of the formula which should be returning the last value in the range, returns the first value in the range.

    I consider myself an excel wizard, and this one has me completely stumped. 50 gold stars to anyone who can shed some light on this.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,502

    Re: INDEX Issue

    It looks like the problem is really within the MATCH() part of the function, and appears to be specific to the "between" tests in the search array building part of the formula. Specifically, (using row 22 as an example) you are asking Excel to find where a text string "95+34.92" is between the text string "93+00" and "117+00" Excel will perform the test using text sort order, but it appears you want to perform the test in "numeric" sort order -- seeing these text strings as a composite of two numbers. In text sort order, both "93+00" and "117+00" are "smaller" than "95+..."

    You've identified the problem as you wrap around at 100, but I expect you will have the same problem in the first "0+00" to "12+00" group as well, since "8+yy.xx" will not return 1000 and 5, but will return 1003 and 8, because "8+yy.xx" will be between "66+00" and "93+00". Your sample file did not include any tests from that group, so you are missing that error.

    You've indicated that you are limited in the changes you can make, so I'm not sure what changes would be allowed. My first thought would be to change everything to "xxx+yy.zz" text strings, with leading zeroes where needed. "095+..." will be between "093+00" and "117+00". The other solution that comes immediately to mind is to convert these "number-like" text strings to real numbers in some way. Maybe replace "x+yy.zz" with a number x.yyzz. "95+34.92" becomes 95.3492 which is naturally between 93.0000 and 117.0000. I cannot know if those kinds of changes would be allowed.

    One way or another, you've got to either make your text sort order "between" mean what you want it to mean, or you've got to transform the data to numbers so that "between" will mean the correct thing as numbers, or you've got to expand your search algorithm so it knows to search 1 digit x+ differently from 2 digit xx+ differently from 3 digit xxx+.

    Something has to change, but I'm not sure what you are allowed to change.
    Last edited by MrShorty; 01-22-2025 at 05:40 PM.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,112

    Re: INDEX Issue

    Removed as MrShorty has explained all!
    Last edited by JohnTopley; 01-23-2025 at 04:44 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. INDEX/MATCH/MAX(IF Issue...
    By mark2323 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2021, 10:45 PM
  2. Replies: 1
    Last Post: 08-17-2019, 01:11 PM
  3. [SOLVED] Another INDEX issue
    By Perch in forum Excel General
    Replies: 3
    Last Post: 11-27-2018, 05:28 AM
  4. Index, match issue
    By hpatel517 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2015, 11:25 AM
  5. [SOLVED] index and match issue
    By BusiMan in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-30-2014, 08:23 PM
  6. index match (issue)
    By step_one in forum Excel General
    Replies: 5
    Last Post: 05-16-2011, 02:58 PM
  7. index..match - issue
    By step_one in forum Excel General
    Replies: 15
    Last Post: 05-03-2011, 08:25 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