+ Reply to Thread
Results 1 to 5 of 5

Formula to return highest string snippet

  1. #1
    Registered User
    Join Date
    02-29-2016
    Location
    US
    MS-Off Ver
    2010
    Posts
    2

    Formula to return highest string snippet

    Im a bit lost on how to approach this. I have a list of purchase order confirmations and I want to return a "this one" for each where the trailing text is max:

    P0001-1
    P0001-2 this one
    P0002-1 this one
    P0003-1 this one
    P0004-1 this one
    P0005-1
    P0005-2 this one

    The formula needs to be automatic (im currently using remove duplicates functionality)
    Any ideas would be appreciated.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Formula to return highest string snippet

    Hi, welcome to the forum

    Probably the simplest way to do this would be to use use a helper column and break out the numbers, then find the highest of those. 1 way to do that would be Text2Columns
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Formula to return highest string snippet

    Hi cobra and welcome to the forum,

    See the attached that takes two columns to fill in. Instead of a simple formula I've added a Dynamic Named Range and based a Pivot off it. Then some VBA code to auto update anything that is added or updated in columns A or B.

    On Change PT Max.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula to return highest string snippet

    Here is another way. This will require two helper columns

    in B2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    in C2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    in D2 and copy down (to get unique PO numbers)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In E2 and copy down ( for results)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    v A B C D E
    1 Data Helper 1 Helper 2 Results Vaues
    2 P0001-1 P0001 1 P0001 2
    3 P0001-2 P0001 2 P0002 1
    4 P0002-1 P0002 1 P0003 1
    5 P0003-1 P0003 1 P0004 1
    6 P0004-1 P0004 1 P0005 2
    7 P0005-1 P0005 1
    8 P0005-2 P0005 2
    Last edited by AlKey; 02-29-2016 at 12:47 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    02-29-2016
    Location
    US
    MS-Off Ver
    2010
    Posts
    2

    Re: Formula to return highest string snippet

    AlKey, this is exactly what Im looking for, thank you.
    Marvin, thanks as well.

+ 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] Formula to return a highest score
    By hokkaido19 in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 01-12-2016, 04:38 AM
  2. Problem with formula: Find highest value and return item
    By Thanks4helping in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-15-2015, 09:35 PM
  3. [SOLVED] IF statement to return string based on highest value in range of columns
    By SeskaLien in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-15-2015, 10:10 PM
  4. Replies: 3
    Last Post: 03-20-2015, 07:04 PM
  5. [SOLVED] Modify formula to return the highest value
    By score in forum Excel General
    Replies: 2
    Last Post: 12-16-2012, 04:51 PM
  6. [SOLVED] Formula to return highest value from duplicate entries
    By JungleJme in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-10-2012, 10:24 AM
  7. Import long string (modified Tom O snippet help!)
    By Brian in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-20-2006, 10:00 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