View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John[_22_] John[_22_] is offline
external usenet poster
 
Posts: 694
Default automated cut and paste using regex

HI
You could copy this formula down column B
=RIGHT(A1,5). change A1 to your needs.
HTH
John
"excel_newbie" wrote in message
...
Have a question... I know there must be a way to automate this process
and wondering if someone could help me out...
column A has motorcycle part numbers i.e. HD101ST-500CC-004MK,
K113-600R-17-00LK4, etc.
these part numbers always end with 5 alphanumeric characters. I want
to "copy" the last 5 alphanumeric characters and paste them into
column B because this will become its truncated id number. There's
about a 100 or so rows in each spreadsheet so I would like to
automated this process by using some kind of function, macro, etc.
that will just loop through column A extracting the last 5 of each
part number, then paste those 5 alphanumerics into the corresponding B
column. I know there must be a way but not sure how to get started or
accomplish this in excel 2000. Thanks for any ideas or assistance in
advance.

+---------------------------------------+-------------------------+
| Column A | Column B |
+---------------------------------------+-------------------------+
| HD101ST-500CC-004MK | 004MK |
+---------------------------------------+-------------------------+
| K113-600R-17-00LK4 | 00LK4 |
+---------------------------------------+-------------------------+