Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Code to make a whole column VBA

  Asked By: Nick    Date: Apr 08    Category: MS Office    Views: 849
  

I have this formula that I need in every cell in the column.
The formula Im using is to seperate First Name from Full Name. Im also going to be using this to seperate the Middle Name and the Last Name.
My formula for the First Name is:
=TRIM(IF(COUNTIF(A2,"* *"),LEFT(A2,FIND(" ",A2)),""))
My Middle Name code is:
=TRIM(SUBSTITUTE(SUBSTITUTE(A2,B2,""),D2,""))
And My Last Name Code is:
=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",LEN(A2))),LEN(A2)))

Is there a VBA Code that code could do this for me?
Or is this a different way to seperate the names from one cell?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Code to make a whole column VBA Or get search suggestion and latest updates.




Tagged: