Consulting

Results 1 to 4 of 4

Thread: How to add a single letter to the end of an growing number

  1. #1
    VBAX Newbie
    Joined
    Feb 2019
    Posts
    2
    Location

    How to add a single letter to the end of an growing number

    I have a scale ticket Excel Sheet and in the sheet is a macro called clear ticket when this is pressed it grows the number by 1 by using this code Range("B3").Value = Range("B3").Value + 1 I would like to add a letter to the end of the number so there are no duplicate scale ticket numbers since two different PCs utilize this excel sheet. Is it possible to add a letter at the end of this growing number? If any other info is needed please let me know!

  2. #2
    VBAX Expert Dave's Avatar
    Joined
    Mar 2005
    Posts
    833
    Location
    Range("B3").Value = Left(Range("B3").Value, Len(Range("B3").Value)-1) + 1 & "A"
    HTH. Dave
    ps. Welcome to this forum.

  3. #3
    VBAX Newbie
    Joined
    Feb 2019
    Posts
    2
    Location
    That worked perfectly!! Thank you so much for your help!!!

  4. #4
    VBAX Expert Dave's Avatar
    Joined
    Mar 2005
    Posts
    833
    Location
    You are welcome. Thanks for posting your outcome. Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •