+ Reply to Thread
Results 1 to 8 of 8

Math with Strings

Hybrid View

  1. #1
    Registered User
    Join Date
    06-06-2017
    Location
    DFW, TX
    MS-Off Ver
    None
    Posts
    2

    Math with Strings

    All,

    I have a number column, but format must be:

    EO-01 to EO-n

    Where n is 2 or more digits.

    Nothing I've tried has worked and must be able to "right corner drag" the first cell in the page and propagate the column.

    Cheers!

    TBNK

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Math with Strings

    Hi and welcome to the forum,

    Would you upload a workbook with a few examples so that we may see your request in context?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Math with Strings

    Hi TBNK- enter 1 in A1, 2 in A2. Apply custom Number Format \EO-00 to both cells (Type it in). Now, WITH BOTH CELLS SELECTED, drag down to fill the series.

    Untitled.png

    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 06-07-2017 at 09:15 AM.

  4. #4
    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
    53,048

    Re: Math with Strings

    This will work for numbers up to 99...
    ="EO-"&TEXT(RIGHT(R2,2)+1,"00")
    Will work on 100 and more
    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

  5. #5
    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
    53,048

    Re: Math with Strings

    OK this works for 3 digits...
    ="EO-"&TEXT(RIGHT(R2,IF(LEN(R2)=6,3,2))+1,"00")
    (with your data starting in R2)

  6. #6
    Registered User
    Join Date
    06-06-2017
    Location
    DFW, TX
    MS-Off Ver
    None
    Posts
    2

    Re: Math with Strings

    Quote Originally Posted by FDibbins View Post
    OK this works for 3 digits...
    ="EO-"&TEXT(RIGHT(R2,IF(LEN(R2)=6,3,2))+1,"00")
    (with your data starting in R2)
    FDibbins,

    Worked great!

    Thanks!

    TBNK

  7. #7
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Math with Strings

    Format the CELL with a custom Number format to keep the numbers AS NUMBERS, as in post #2:
    Custom Number Format \EO-00 displays "EO-04", but the cell value = 4.

    If you need them AS TEXT, use this formula (in A2 and down) (similar to Ford's post#5):
    =TEXT(MID(A1,4,8)+1,"\EO-00")

    Both approaches work with any number of digits. In each case, the # of zeros determines the minimum # of digits shown.

    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 06-07-2017 at 09:56 AM.

  8. #8
    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
    53,048

    Re: Math with Strings

    Great, happy to help

+ 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. Macro to Delete only Alpha Strings but not Alphanumeric or Numeric Strings in a Cell
    By papageorgio in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2016, 06:55 AM
  2. [SOLVED] Loop through strings stop when strings change and start looping in the next column...?
    By Prexcel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-18-2013, 03:31 AM
  3. excel formula to search Multiple strings in several columns and return strings
    By krratna123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2013, 11:20 AM
  4. Replies: 1
    Last Post: 08-13-2013, 08:32 AM
  5. Replies: 2
    Last Post: 03-07-2013, 02:34 AM
  6. Replies: 5
    Last Post: 02-15-2012, 09:57 AM
  7. Replies: 3
    Last Post: 02-16-2006, 07: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