Hi,
I have a value in a cell(say A1 cell) => "This is a versatile macro" and i want this cell value to be splitted in 5 rows like
This
is
a
versatile
macro
How could i do this?
Please help guyz
Refer the attached excel
Hi,
I have a value in a cell(say A1 cell) => "This is a versatile macro" and i want this cell value to be splitted in 5 rows like
This
is
a
versatile
macro
How could i do this?
Please help guyz
Refer the attached excel
Last edited by SaurabhShri1; 03-21-2013 at 08:36 AM.
I think you could do something like this:
and the Main functionPlease Login or Register to view this content.
You may need to debug this, because I do not have an Excel on my current laptop. Especially the Instr sentence, because I sometimes make mistake using it (I often put parameters 2 & 3 in the bad order).Please Login or Register to view this content.
Hope it will helps.
Last edited by Grizar; 03-21-2013 at 01:58 PM.
This can be done with formulas, but if you really need a macro, it can be done as a one-liner:
Please Login or Register to view this content.
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
To make the macro more versatile, this version will prompt first for the string to split, and second for the user to select the output destination starting cell:
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks