ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Break up strings into separate cells (https://www.excelbanter.com/excel-programming/346406-break-up-strings-into-separate-cells.html)

al007

Break up strings into separate cells
 
What code do I need to split Id Numbers & characters in separate cells?
eg
V080779382799E
how can I have V in a separate cell, 0 in cell next to it, 8 in next
cell to the right and so on

thxs


bpeltzer

Break up strings into separate cells
 
Assuming you've got a whole table of these, can you use Data Text To
Columns, indicate that each column is a fixed width, and create breaks after
each character?
Otherwise, you might use the MID and COLUMN functions. If your data starts
in A1, then in B1: =MID($A1,COLUMN()-1,1). Copy that formula across to as
many columns as you need. (You might also check that you haven't passed the
input cell's length: =if(column()len($a1),mid($a1,column()-1,1),"")

"al007" wrote:

What code do I need to split Id Numbers & characters in separate cells?
eg
V080779382799E
how can I have V in a separate cell, 0 in cell next to it, 8 in next
cell to the right and so on

thxs



JMay

Break up strings into separate cells
 
You can use Data, Text to Columns;
Fixed Length
Click behind each of your characters;
Done.

"al007" wrote in message
oups.com...
What code do I need to split Id Numbers & characters in separate cells?
eg
V080779382799E
how can I have V in a separate cell, 0 in cell next to it, 8 in next
cell to the right and so on

thxs




al007

Break up strings into separate cells
 
HOW CAN I LOOP IN THE CELL TO GET THE NUMBERS OF CHARACTERS & GET A
MACRO TO DO IT IN ONE GO INSTEAD OF CLICKING


THXS


JMay wrote:
You can use Data, Text to Columns;
Fixed Length
Click behind each of your characters;
Done.

"al007" wrote in message
oups.com...
What code do I need to split Id Numbers & characters in separate cells?
eg
V080779382799E
how can I have V in a separate cell, 0 in cell next to it, 8 in next
cell to the right and so on

thxs



Dave Peterson

Break up strings into separate cells
 
You can do it in a loop, but it'll be quicker/easier to use Data|Text to
columns.

Try recording a macro when you select the range and do the data|text to columns.

You're code will be pretty much done.

If you need to tweak it, post back with what you have.

Ps. A lot of people (me included) find all caps very difficult to read. If you
have to post without upper/lower, can you use all lower case?

al007 wrote:

HOW CAN I LOOP IN THE CELL TO GET THE NUMBERS OF CHARACTERS & GET A
MACRO TO DO IT IN ONE GO INSTEAD OF CLICKING

THXS

JMay wrote:
You can use Data, Text to Columns;
Fixed Length
Click behind each of your characters;
Done.

"al007" wrote in message
oups.com...
What code do I need to split Id Numbers & characters in separate cells?
eg
V080779382799E
how can I have V in a separate cell, 0 in cell next to it, 8 in next
cell to the right and so on

thxs


--

Dave Peterson


All times are GMT +1. The time now is 01:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com