+ Reply to Thread
Results 1 to 6 of 6

Thread: Choosing Highest value of a range of cells containing a combination , text and number

  1. #1
    Registered User
    Join Date
    12-29-2011
    Location
    New Iberia, LA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Choosing Highest value of a range of cells containing a combination , text and number

    Hello,
    I have a range of cells D:10 THROUGH D:23.
    I am trying to find the largest value in this range and place its numeric value in cell D:24.

    The data that is in the range will be as follows:
    STK
    1-WK
    2-WK
    3-WK ......ETC.

    I want the STK to be valued at 3 days.

    Any help on this would be greatly appreciated.

  2. #2
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,520

    Re: Choosing Highest value of a range of cells containing a combination , text and nu

    See if this is returns the result you intended:

    {=MAX(LEFT($D$10:$D$23,FIND("-",$D$10:$D$23,1)-1)+0)}

    The above is an array formula and MUST be committed by pressing the Ctrl + Shift + Enter keys in combination.

    The formula assumes you always have a hyphen character immediately after the numeric.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,699

    Re: Choosing Highest value of a range of cells containing a combination , text and nu

    With
    D10:D23 having cells containing numbers followed by "-WK" or blanks,
    this regular formula (completed by just pressing ENTER) returns the largest "-WK" value , ignoring the blanks
    =MAX(INDEX(--(LEFT("0"&D10:D23,FIND("-",D10:D23&"-"))),0))
    Is that something you can work with?
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    12-29-2011
    Location
    New Iberia, LA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Choosing Highest value of a range of cells containing a combination , text and nu

    Ron,
    Thank you for responding I tried your formula, and it is working. The only problem I have is when the text "STK" is used in the D10:D:23 range it gives me a Value error.
    Is their any way to make "STK" to be valued at lets say 1 week.

  5. #5
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,699

    Re: Choosing Highest value of a range of cells containing a combination , text and nu

    I'm not sure I understand what you want D10:D23 to contain.
    Can you post an example of what you want to do?
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

  6. #6
    Registered User
    Join Date
    12-29-2011
    Location
    New Iberia, LA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Choosing Highest value of a range of cells containing a combination , text and nu

    Just Had a brain storm LOL I will just do away with the STK. Thank you Guys.

+ 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.2.0