+ Reply to Thread
Results 1 to 12 of 12

Version Incompatibility for a Number Extraction Formula?

  1. #1
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Version Incompatibility for a Number Extraction Formula?

    I have a formula that will extract the only the first consecutive string of numbers in an alphanumeric string. Here is what the data in the cells I am referencing looks like:
    7 MPH (28.0%)

    Here is the formula I am using to extract only the numbers before the MPH (in this case, 7):
    Please Login or Register  to view this content.
    In Excel 2019, this works perfectly. The problem is that I have Excel 2013 at work, and it just gives me a "#N/A" error. It doesn't make any sense to me because the LEFT, MATCH, and ISNUMBER all exist in Excel 2013. Does anyone have any idea why this may be failing to work in an older version of Excel? If it's any help, I incorporated this formula into a macro, which works perfectly in Excel 2019, but when I run it in Excel 2013, I get "Run-Time Error '438': Object doesn't support this property or method", and the line with the formula above is highlighted when debugging.

    Any help is much appreciated!
    Last edited by applehugger; 08-23-2021 at 11:56 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,725

    Re: Version Incompatibility for a Number Extraction Formula?

    Maybe there is something in the data, or a referenced formula, causing a ripple effect. Can you attach your file? See yellow banner at the top of the page.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Re: Version Incompatibility for a Number Extraction Formula?

    Sure can; probably should have done that in the first place. Here you go, and thanks for taking a look at this!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Version Incompatibility for a Number Extraction Formula?

    Use LEN to establish if there is any spurious data embedded as mentioned above.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Version Incompatibility for a Number Extraction Formula?

    Doesnt look like any embedded data but there are macros in that file, so something odd with them I guess.

  6. #6
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Version Incompatibility for a Number Extraction Formula?

    with your current formula, I would expect CTRL + SHIFT + ENTER required for XL2013 (rather than committing with Enter)

    however, if, as implied, you're pulling LEFT then just use:

    =LOOKUP(9.99E+307,--LEFT([@[OVER LIMIT]],ROW($1:$15)))

  7. #7
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Re: Version Incompatibility for a Number Extraction Formula?

    Quote Originally Posted by Special-K View Post
    Doesnt look like any embedded data but there are macros in that file, so something odd with them I guess.
    Well, good point, but I just tried copying and pasting the data to a blank worksheet, changing the cell references so it points directly to only one cell, and I still get the same issue.

    I attached a spreadsheet with just this formula; all of the macros are gone. It still isn't working for me in Excel 2013.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Re: Version Incompatibility for a Number Extraction Formula?

    Quote Originally Posted by XLent View Post
    with your current formula, I would expect CTRL + SHIFT + ENTER required for XL2013 (rather than committing with Enter)

    however, if, as implied, you're pulling LEFT then just use:

    =LOOKUP(9.99E+307,--LEFT([@[OVER LIMIT]],ROW($1:$15)))
    Dude, that worked. The Ctrl+Shift+Enter I mean. Thanks for the alternate formula though!

    So this will probably expose me as a total novice, but how do I know what constitutes an array formula, which then requires Ctrl+Shift+Enter?

  9. #9
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Version Incompatibility for a Number Extraction Formula?

    in this instance, the MATCH on the implicit array -- poor terminology, that no doubt, others can correct ;-)

    latter versions of XL don't require the CSE entry to enforce the Array calculation.

    you can get around it by embedding a further INDEX, e.g.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    but a little more overhead - i.e. it doesn't improve performance whatsoever but, it simply negates the need for CSE -- useful in older versions from a robustness standpoint (i.e. easy to forget to reset the Array if editing formula)

  10. #10
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Re: Version Incompatibility for a Number Extraction Formula?

    in this instance, the MATCH on the implicit array -- poor terminology, that no doubt, others can correct ;-)

    latter versions of XL don't require the CSE entry to enforce the Array calculation.

    you can get around it by embedding a further INDEX, e.g.

    Formula: [Select Code]

    =LEFT([@[OVER LIMIT]],MATCH(FALSE,INDEX(ISNUMBER(--MID([@[OVER LIMIT]],ROW($1:$94),1)),0),0)-1)

    confirmed with Enter

    but a little more overhead - i.e. it doesn't improve performance whatsoever but, it simply negates the need for CSE -- useful in older versions from a robustness standpoint (i.e. easy to forget to reset the Array if editing formula)
    Awesome; thank you! This is a much better solution and is working perfectly with just Enter.
    Last edited by applehugger; 08-23-2021 at 12:50 PM.

  11. #11
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,725

    Re: Version Incompatibility for a Number Extraction Formula?

    None of this explains why the original formula worked in one version of Excel but not another....

  12. #12
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Re: Version Incompatibility for a Number Extraction Formula?

    In Excel 2013, you have to press Ctrl+Shift+Enter for array formulas to calculate properly. That isn't necessary in Excel 2019 (I think Excel 2016 made that change... I could be mistaken).

    So all I had to do was do Ctrl+Shift+Enter in Excel 2013 instead of just hitting Enter. However, XLent's rewritten formula negated the need for that by eliminating the array and worked perfectly, as always.

+ 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. Multiple Names Extraction Version 2?
    By wedzmer in forum Excel General
    Replies: 3
    Last Post: 02-01-2019, 03:46 AM
  2. Formulas not working in higher version, 2010 Version to 2013 version
    By thilag in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-19-2015, 09:09 PM
  3. number extraction
    By suhabthan in forum Excel General
    Replies: 5
    Last Post: 06-10-2015, 06:45 AM
  4. [SOLVED] Base Number Extraction
    By jr_smith in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-30-2012, 10:53 AM
  5. Number Extraction
    By armansoor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2011, 04:03 PM
  6. Replies: 1
    Last Post: 03-01-2008, 11:05 PM
  7. Version Incompatibility
    By JUnk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2005, 11:05 AM

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