Solved

Excel 2010 Remove characters vba

Posted on 2014-11-06
2
242 Views
Last Modified: 2014-11-06
I have a very simply spread sheet. Starting in column a2 I scan a barcode that returns a result of ABC12345. The cursor then goes into a3 to scan my next barcode which will be abc55555 and so on. All the barcodes will begin with ABC. What I would like to happen is when scanning the barcode ABC is removed to just show the number (12345).  I want this to happen automatically not using something like =RIGHT(A2, LEN(A2)-3. It seems when I try this It does not change my result.

Any help is appreciated.
0
Comment
Question by:tmaususer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40426591
Put this in the VBA code for that Sheet (not in a module).

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
    If Left(Target.Value, 3) = "ABC" Then
        Target.Value = Mid(Target.Value, 4, 9999)
    End If
End If
End Sub

Open in new window

0
 

Author Closing Comment

by:tmaususer
ID: 40426602
Fantastic! Thank you very much
0

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
A WS within a WS 11 36
Simple Absolute Addressing Problem in an Excel Macro 25 41
Macro Modification to refresh non-contiguous Cells in a Worksheet 12 33
LOOK FOR 22 20
A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question