+ Reply to Thread
Results 1 to 7 of 7

max value in column of alphanumerics, with blanks

  1. #1
    Registered User
    Join Date
    10-26-2015
    Location
    bristol, uk
    MS-Off Ver
    2013
    Posts
    3

    max value in column of alphanumerics, with blanks

    Hi. See attached spreadsheet showing extract from a larger sheet.

    I have a column of part numbers with alpha prefixes. The column also has blanks.

    I need a formula that reports the maximum numeric suffix. i.e. 104801.

    The top cell is my current effort, but this doesn't ignore the blanks so returns an error.

    Note, the prefix will always be P-COL-.

    Thanks.
    Attached Files Attached Files
    Last edited by TheKraken; 10-26-2015 at 07:39 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,820

    Re: max value in column of alphanumerics, with blanks

    Try ..

    =MAX(IF(A4:A74<>"",RIGHT(A4:A74,6)+0))

    Enter with Ctrl+Shift+Enter

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: max value in column of alphanumerics, with blanks

    =MAX(INDEX(SUBSTITUTE("P-COL-0"&A4:A500,"P-COL-","")*1,0))
    Please Login or Register  to view this content.
    Try this one
    Please Login or Register  to view this content.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: max value in column of alphanumerics, with blanks

    OK. 2 already there, so one more - array formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Best Regards,

    Kaper

  5. #5
    Registered User
    Join Date
    10-26-2015
    Location
    bristol, uk
    MS-Off Ver
    2013
    Posts
    3

    Re: max value in column of alphanumerics, with blanks

    Thanks everyone, they all work. I'm a light excel user so don't really understand the equations, but will find time later to do so.

    nflsales, I'm using your version as it was closest to my original. You've added in "P-COL-0"& to make it work. What does this mean?

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: max value in column of alphanumerics, with blanks

    It is just adding in front of any cell contemts P-COL-0
    so it cell is (empty) is treated as
    P-COL-0
    if cell is
    P-COL-100101
    then it becomes
    P-COL-0P-COL-100101
    but then with substitute
    "P-COL-" by ""
    they become "0" and "0100101" respectively, and finally multiplied by 1
    0 and 100101

    I used above "0" and 0 for purpose to emphasize that the first is text, and the next is number (only the latter is a good input for MAX function.
    BTW.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    shall be enough

  7. #7
    Registered User
    Join Date
    10-26-2015
    Location
    bristol, uk
    MS-Off Ver
    2013
    Posts
    3

    Re: max value in column of alphanumerics, with blanks

    Great, I understand. Thanks.

+ 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. Replies: 8
    Last Post: 06-15-2016, 09:53 AM
  2. [SOLVED] Creating Single Column List from multi-row/column table and removing blanks
    By ChemistB in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 03-10-2014, 02:23 PM
  3. [SOLVED] find a column by date and filter that column by removing blanks
    By rsami in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-28-2013, 10:56 PM
  4. Replies: 1
    Last Post: 08-13-2012, 10:59 AM
  5. Scan a Column A (numbers and blanks) and copy its contents WITHOUT BLANKS into Column B
    By bighandsam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 05:16 PM
  6. [SOLVED] Returning most recent daily data in a column if blanks in column
    By InnesMcc in forum Excel General
    Replies: 6
    Last Post: 11-04-2011, 09:41 AM
  7. [SOLVED] Returning most recent daily data in a column if blanks in column
    By InnesMcc in forum Excel General
    Replies: 2
    Last Post: 11-04-2011, 06:28 AM

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