Results 1 to 17 of 17

Determine last number in a column that contains numbers, and strings

Threaded View

  1. #1
    Registered User
    Join Date
    09-03-2012
    Location
    Online
    MS-Off Ver
    Excel 2016
    Posts
    48

    Determine last number in a column that contains numbers, and strings

    All,

    I'm trying to figure out how to determine the last number in a column, with a caveat. The column will contain both integers (ascending), and strings (also ascending, but the format is variable, and not required for this exercise).

    What I would like to do, is have a button on a userform that when clicked looks at the column, finds the last number used and increments it by 1. There may be white space between the current cell and the number, there may also be a string in the way. Example attached

    Many thanks for the help!


    sample_help.xlsx

    Bonus points: Looking at the example file, is there a simple routine I could use to increment the string? The data will virtually always have the same format, with 2 incrementing characters at the end. In extremely rare cases it might extend to 3 characters. If not found, create first example + 01 at the end


    I've done pretty well with my vba so far, but this one has me stumped :/
    Last edited by anakaine; 05-20-2015 at 10:28 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Determine whether number of positive numbers exceeds number of negative numbers
    By HRBP in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-04-2012, 09:49 PM
  2. [SOLVED] determine column number and sum
    By slxia1 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-30-2012, 07:56 AM
  3. Determine Row Number of Last Value in column
    By lake54 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-15-2009, 02:48 PM
  4. Replies: 1
    Last Post: 06-30-2006, 03:10 AM
  5. Replies: 0
    Last Post: 08-25-2005, 05:49 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