macro for splitting a column

Hi ,
I have attached the sample spreadsheet for the data that I currently have in CurrentEmployeeID and the required desired data as shown in the DesiredEmployeeID worksheet.

Basically, I have the EmployeeID as 1024-A-02 and I would like this to be split to 1024 and A02 in two different columns.

Thanks very much!
CurrentEmployeeNo.xlsx
DesiredEmployeeNo.xlsx
jen RadAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
Are they all -A-01  ?

Are you looking for VBA or non-VBA or any
0
jen RadAuthor Commented:
No...it could be anything like -B-02 or -C-04
0
Saqib Husain, SyedEngineerCommented:
Enter this formula in B2
=VALUE(LEFT(A2,FIND("-",A2)-1))

and this in C2
=SUBSTITUTE(SUBSTITUTE(A2,"-",""),B2,"")

and copy them down all the way. Now select the columns B and C and copy all and paste-special as values.

Now you can delete column A
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.