+ Reply to Thread
Results 1 to 7 of 7

Can't debug formula, and a quick array question

  1. #1
    Registered User
    Join Date
    04-12-2011
    Location
    Leeds, England
    MS-Off Ver
    Excel 2007/2010
    Posts
    67

    Can't debug formula, and a quick array question

    Hi,

    I'm getting a strange result from this formula, and when I go through the 'evaluate formula' it seems to be fine until the last step - would be grateful if someone could take a quick look:

    A20 is "ksdfh 34 aserk234 der", and I'm trying to get the largest digit with this formula but it is returning 3:

    Please Login or Register  to view this content.

    And a quick question - alot of the ways I'm attempting to do things are coming unglued because an array within the formula is not sorted (so I can't use MATCH for example). Is there any way to force the result into ascending order please?

    Thanks a lot,

    Chinchin

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,043

    Re: Can't debug formula, and a quick array question

    What is expected result of above example?
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    04-12-2011
    Location
    Leeds, England
    MS-Off Ver
    Excel 2007/2010
    Posts
    67

    Re: Can't debug formula, and a quick array question

    The largest digit - 4

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,043

    Re: Can't debug formula, and a quick array question

    Try this, comfirmed with ctrl+shift+enter

    =MAX(IFERROR(--MID(A1, ROW($A$1:$A$100), 1), 0))

    Note: doesn't work for pre-2007 XL

  5. #5
    Registered User
    Join Date
    04-12-2011
    Location
    Leeds, England
    MS-Off Ver
    Excel 2007/2010
    Posts
    67

    Re: Can't debug formula, and a quick array question

    Thanks a lot - very nice. Can you see what was not working in my formula too? I like to know so I can learn from my mistakes!

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,043

    Re: Can't debug formula, and a quick array question

    LOOKUP formula will return you last number, not biggest in any way... In your example it flip your word from AB32C4 into 4-C-2-3-B-A and looking for last number you get 3.

  7. #7
    Registered User
    Join Date
    04-12-2011
    Location
    Leeds, England
    MS-Off Ver
    Excel 2007/2010
    Posts
    67

    Re: Can't debug formula, and a quick array question

    Ah, ok same problem as with match - thanks again. I guess that could be fixed up if I can force an array into order in a function - anyone know if that's easily done?
    Last edited by Chinchin; 04-18-2011 at 09:11 AM.

+ 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