+ Reply to Thread
Results 1 to 5 of 5

Find large or max with logical values

  1. #1
    Forum Contributor ianh's Avatar
    Join Date
    11-19-2010
    Location
    Newcastle
    MS-Off Ver
    Excel 2010
    Posts
    114

    Find large or max with logical values

    I have a set of alpha numeric values in a scale 3c,3b,3c,4c,4b,4a
    I want to be able to add a formula in the next column to return the largest value.
    I thought either max or large could be used to return a value but neither work on logical values.

    I cant convert the values numbers to a number only.

    I would use an if statement but this would get very large (there can but multiple columns to check)

    anyone have an idea?
    Attached Files Attached Files
    Last edited by ianh; 06-29-2011 at 10:09 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,424

    Re: Find large or max with logical values

    If they are all of that format, one way, maybe:

    =DEC2HEX(MAX(HEX2DEC(A2),HEX2DEC(B2),HEX2DEC(C2),HEX2DEC(D2)))

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor ianh's Avatar
    Join Date
    11-19-2010
    Location
    Newcastle
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Find large or max with logical values

    Thanks for that but it wont work in this instance as the scale is 4c is lower than 4b is lower than 4a.
    so the formula returns 4c not 4a.
    Last edited by ianh; 06-29-2011 at 06:18 AM. Reason: Tone was a bit harsh when someones trying to help me

  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: Find large or max with logical values

    =LEFT(MAX(--LEFT(A2:D2)+1/CODE(RIGHT(A2:D2))))&CHAR(1/(MAX(--LEFT(A2:D2)+1/CODE(RIGHT(A2:D2)))-LEFT(MAX(--LEFT(A2:D2)+1/CODE(RIGHT(A2:D2))))))
    array entered with contol shift +enter will work for single digit with any letter a-z
    "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
    Forum Contributor ianh's Avatar
    Join Date
    11-19-2010
    Location
    Newcastle
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Find large or max with logical values

    Thanks Martin,

    Works a treat, being an array really helps as the number of cells will change over time so i can specify the range rather than a messy nested if.

    I've never used the CHAR or CODE before and can see how useful they will be to me for other sheets i'm working on. you've just saved me loads of time in the future.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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