troubleshooting Question

Copy part of cell (in Edit mode), to a different cell in a loop macro.

Avatar of Mezczyzna
MezczyznaFlag for Canada asked on
Microsoft OfficeMicrosoft ExcelVBA
29 Comments1 Solution49 ViewsLast Modified:
Hello,

Looking for idea to write a macro replacing the first three characters currently sitting in the ERP column.

PartId   Number      ERP
Oct-35      414825      01-10-3035
Oct-60      423957      01-10-3060
Oct-92      508694      01-10-3292
Oct-95      509789      03-05-2018
Oct-12      515998      01-10-3312
Oct-43      527320      01-10-3343

The above data comes from our ERP as csv file and shows date in the PartID columns on 6,600 parts out of 30K. It is formatted as date and the Number column shows what is the value for the date. The data in cell however looks like the one in column ERP.
When you click F2 remove the first 3 characters, enter ' to mark it a text and enter key, it properly shows part ID as 10-3035.

I tried to write a macro replacing three rows to use in a loop, but it enters hard coded Part ID.
Then I tried to press F2 - Copy the right seven characters, but it enter hard coded Part ID again.

What I need it to copy and paste the actual changing part ID.

Any idea how can I do that?

The right() function doesn't work because it the number.

Your help is greatly appreciated.
Thank you.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 29 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 29 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros