ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   automated cut and paste using regex (https://www.excelbanter.com/excel-worksheet-functions/224989-automated-cut-paste-using-regex.html)

excel_newbie

automated cut and paste using regex
 
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 |
+---------------------------------------+-------------------------+


John[_22_]

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 |
+---------------------------------------+-------------------------+



Jarek Kujawa[_2_]

automated cut and paste using regex
 
=RIGHT(A1,5)

On 20 Mar, 12:56, excel_newbie wrote:
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 * * * * |
+---------------------------------------+-------------------------+




All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com