+ Reply to Thread
Results 1 to 13 of 13

Formula help required - lookup and return the max alphanumeric value

Hybrid View

  1. #1
    Registered User
    Join Date
    12-23-2014
    Location
    London, England
    MS-Off Ver
    2003
    Posts
    9

    Formula help required - lookup and return the max alphanumeric value

    Hi all,

    I'm new to the foum but hope someone can help with adapting a formula for me. I have a document register spreadsheet with document names listed in rows at left. Alongside each document name are dated columns recording the revision of each docuemnt.

    I have a working array formula as below using max value that scans the row and returns the "current revision".
    =IF(SUM(--ISNUMBER(J37:BO37)),MAX(J37:BO37),CHAR(MAX(IF(J37:BO37<>"",CODE(J37:BO37),""))))

    This works fine assuming the revision is a single digit and revisons 1, 2, 3 etc are more current than A, B, C etc.
    Sometimes we have document revisions using more than one digit i.e. T1, T2, C1, C2 etc and then the formula falls down because it see T1, T2 etc as just T.
    Can someone suggest how to adapt the formula so that it tests LEN<>1, then finds MAX of first digit i.e. T not C, then max of second digit i.e. T2 not T1.

    thanks in advance.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Formula help required - lookup and return the max alphanumeric value

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    12-23-2014
    Location
    London, England
    MS-Off Ver
    2003
    Posts
    9

    Re: Formula help required - lookup and return the max alphanumeric value

    Attached is an example spreadsheet with some dummy rows / columns of data. The colume in red is the formula I want to adapt.
    Attached Files Attached Files

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

    Re: Formula help required - lookup and return the max alphanumeric value

    sorry what is the order of revisions?
    a ,a1,a2,b,b1,b2,b3....,zz,zz1,zz2, 1, 2, 3 so t2 is later than c5 or what? and any number on its own later than any letter number combination?
    Last edited by martindwilson; 12-23-2014 at 09:29 AM.
    "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

  5. #5
    Registered User
    Join Date
    12-23-2014
    Location
    London, England
    MS-Off Ver
    2003
    Posts
    9

    Re: Formula help required - lookup and return the max alphanumeric value

    We find subcontractor's use either single digit A, B,, 1, 2, 3 or double digits T1, T2, T3, C1, C2, C3. but not a combination. If the formula could work with either would be my ideal.

    In terms of heirarchy for the double digits, let's say the first letter is of primary importance so C1 trumps A1, A5, A9 etc and of course C2 trumps C1.
    Last edited by rgimblett; 12-23-2014 at 10:38 AM.

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

    Re: Formula help required - lookup and return the max alphanumeric value

    would there be cases of a,b,1,2 oh is see lsat example a,d,c, 1,2,3
    would they always be in order from left to right and you just want the last one?
    given all that what are the results expected in b29:b35
    Last edited by martindwilson; 12-23-2014 at 11:24 AM.

  7. #7
    Registered User
    Join Date
    12-23-2014
    Location
    London, England
    MS-Off Ver
    2003
    Posts
    9

    Re: Formula help required - lookup and return the max alphanumeric value

    Unfortunately it can't just grab the right-most cell with a value, it has to evaluate all cells in the range and determine the highest value. The current formula is working exactly this way but only for single digits.
    On the example spreadsheet, I expect the range B29:B35 to show T2, T1, T1, T1, T1, T1, 3 from top to bottom. In the example case I'm looking for T1 to trump C1, C2, C3 & C4. In future I may have a case where I want C1 to trump T1 but in the first instance I need a formula that effectively evaluates the two digits.
    Last edited by rgimblett; 12-23-2014 at 11:30 AM.

  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: Formula help required - lookup and return the max alphanumeric value

    =INDEX(J29:T29,IF(COUNT(J29:T29),MATCH(MAX(J29:T29),J29:T29,0),MATCH(MAX(IFERROR(CODE(LEFT(J29:T29))+TEXT(MID(J29:T29,2,3),"000")/100,0)),IFERROR(CODE(LEFT(J29:T29))+TEXT(MID(J29:T29,2,3),"000")/100,0),0)))
    array entered

  9. #9
    Registered User
    Join Date
    12-23-2014
    Location
    London, England
    MS-Off Ver
    2003
    Posts
    9

    Re: Formula help required - lookup and return the max alphanumeric value

    Seems to be with Count(J29:T29)

  10. #10
    Registered User
    Join Date
    12-23-2014
    Location
    London, England
    MS-Off Ver
    2003
    Posts
    9

    Re: Formula help required - lookup and return the max alphanumeric value

    Thanks Martin, I've input the array formula but it's showing an invalid name error. Any tips?

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

    Re: Formula help required - lookup and return the max alphanumeric value

    no its because you have 2003 blast

  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: Formula help required - lookup and return the max alphanumeric value

    =index(j29:t29,if(count(j29:t29),match(max(j29:t29),j29:t29,0),match(max(if(iserror(code(left(j29:t29))+text(mid(j29:t29,2,3),"000")/100),0,code(left(j29:t29))+text(mid(j29:t29,2,3),"000")/100)),if(iserror(code(left(j29:t29))+text(mid(j29:t29,2,3),"000")/100),0,code(left(j29:t29))+text(mid(j29:t29,2,3),"000")/100),0)))

  13. #13
    Registered User
    Join Date
    12-23-2014
    Location
    London, England
    MS-Off Ver
    2003
    Posts
    9

    Re: Formula help required - lookup and return the max alphanumeric value

    Genius!
    Thanks very much for your help to solve this.

+ 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. [SOLVED] Lookup formula required?
    By NeroM in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-07-2014, 01:13 AM
  2. [SOLVED] Alphanumeric 'ISNUMBER' formula to return 'Yes' or 'No'
    By RuthieBuxton in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-08-2013, 10:27 AM
  3. [SOLVED] Lookup formula required to search for two criteria and return result
    By dave1983 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2012, 03:29 PM
  4. Lookup and Match Formula required
    By pauldaddyadams in forum Excel General
    Replies: 15
    Last Post: 09-12-2012, 12:05 PM
  5. [SOLVED] Formula not Return Required Answer Q
    By John in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-23-2006, 04:50 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