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?
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.