View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Ignoring Certain Characters In a Cell Using VBA

Use the Left function to extract the left-most 8 digits.

Res = Left(Range("A1").Value,8)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Lil Pun"
wrote in message
...

I have a problem with some code I have. It is setup right now
so that
data entered into column A must match or it is then moved to
column B.
The data in column A is always going to be 13 characters long

The problem is the last 5 digits of the data are always going
to be
different and the first 8 are always going to be the same. So
basically
the code needs to be setup to recognize the first 8 digits of
data and
ignore the last 5.

Is there any simple way to do that?


--
Lil Pun
------------------------------------------------------------------------
Lil Pun's Profile:
http://www.excelforum.com/member.php...o&userid=33840
View this thread:
http://www.excelforum.com/showthread...hreadid=549758