+ Reply to Thread
Results 1 to 3 of 3

VB Code format for different length strings

  1. #1
    Registered User
    Join Date
    12-10-2013
    Location
    dallas, tx
    MS-Off Ver
    Excel 2007
    Posts
    36

    VB Code format for different length strings

    I've got a program trying to format a cell range of credit cards. Since Amex is 15 characters and everything else is 16, I need to build a format that won't add a leading 0 digit to a text string that is 15 characters long. Here's my code thats not working. Any recommendations?

    Please Login or Register  to view this content.
    It's late, I'm tired, and I'm sure I'm doing something obviously stupid, so any recommendations would be helpful.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: VB Code format for different length strings

    Maybe this.

    Please Login or Register  to view this content.
    Last edited by mike7952; 09-12-2016 at 12:43 AM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    12-10-2013
    Location
    dallas, tx
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: VB Code format for different length strings

    Perfect, thanks for the late night 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. [SOLVED] Sum up strings starting with, and specified length
    By drgkt in forum Excel General
    Replies: 16
    Last Post: 01-07-2016, 07:56 PM
  2. Making all text strings the same length
    By rs56369 in forum Excel General
    Replies: 3
    Last Post: 11-12-2014, 07:45 AM
  3. [SOLVED] MAX value of LENgth of strings, one formula
    By gvaltat in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-03-2014, 09:57 PM
  4. Cannot store strings of length more than 250
    By bintoca in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2013, 03:17 AM
  5. [SOLVED] Format individual strings out of multiple strings within a cell with VBA
    By jrtraylor in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-18-2013, 07:33 PM
  6. [SOLVED] 2010: random length strings in cell - need to split
    By dhipwood in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-30-2012, 11:46 AM
  7. [SOLVED] Excel 2007 : Averaging variable length strings
    By mayj in forum Excel General
    Replies: 2
    Last Post: 06-07-2012, 09:13 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