+ Reply to Thread
Results 1 to 4 of 4

account # altering macro question

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    account # altering macro question

    Hello! I'm seeking advice & help regarding the following issue-
    I have account #'s that look something like this:
    ADA1-000859-0000-06
    ADA1-000868-0000-01
    ADA1-000883-0000-02
    ADA1-000883-0000-03
    ADA1-000884-0000-02
    ADA1-000889-0000-08
    BEL2-000861-0000-01
    BEL2-000877-0000-08
    BEL2-000895-0000-02


    These account #'s begin in Column A2 downward to Approximately A5000. In Column B2 down to B5000 would be usage amounts affiliated with the account #'s in column A. What I need without distorting any of the usage amounts for these particular accounts, is a macro or vba code, which I could possible activate via a button (preferred), that would delete the last three digits in all of the account numbers in column A2 thru A500. After the activation of the "button", my account #'s would then change and look like this: (citing the example above)

    ADA1-000859-0000
    ADA1-000868-0000
    ADA1-000883-0000
    ADA1-000883-0000
    ADA1-000884-0000
    ADA1-000889-0000
    BEL2-000861-0000
    BEL2-000877-0000
    BEL2-000895-0000

    Any help would be greatly appreciated!!

  2. #2
    Forum Contributor
    Join Date
    06-03-2008
    Posts
    387
    Please Login or Register  to view this content.
    You can then just add a button and assign "remove3Digits" as the macro.

  3. #3
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Thank you!!

    It works great! Thank you!

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    One more question

    Is there a way to edit this code to eliminate a debugging error if there is no account data or just a zero in a cell and allow the code to continue working by just skipping over to the next cell down? until it reaches A5000? I'd sure appreciate anyone's help! Thanks in advance!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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