If you liked our blogs, share it with your friends on Facebook. When you will run the macro, the names will split in three columnsĬonclusion: In this way, we can split the names into 3 columns, using VBA in Microsoft Excel. Press the key F5 to run the Macro in Excel.Then go to insert menu and click on procedure, where you will get the procedure to start the macroĬells(A, 4) = Right(Cells(A, 1), Len(Cells(A, 1)) - C)Ĭode Explanation:- First we have given the macro name, then we used x to define the data range, and then we used A, B and C to define how values should be picked from the cells. See the below procedure and code, and you will understand it easily:. To split the name into 3 cells, we will use VBA. We will write the VBA code to split the name. We want to split the entire column into three columns, with one containing all of the first names, second contains Initial and the third containing all of the last names. We have a list of names in the format "FirstName Initial LastName" in column A. Let’s take an example to understand where and how we can split the name. In this article, we are going to learn how to split the name into 3 cells, using VBA in Microsoft Excel. If you are facing trouble in splitting the text into two or more separate columns based on the specific character then you should read this article.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |