to split a cell

natedogg

New Member
Joined
Nov 3, 2004
Messages
43
i can split a column of cells right after the 9th digit by using text to columns. which i can insert that code in a macro i need to run. when i choose text to columns, i need my data to remain text, which some numbers start with a zero. those get deleted. then having to reformat the column to text, seems different sources of data are not turning to text when, i dont know but does anyone have an efficient piece of code laying around that will take the digits after the 9th and delete those or placing on next column or something. :huh:
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Try to record one macro for text to columns. Note step 3 of the wizard, you can set any of splitted columns to text. Study the macro, the format exists in the FieldInfo like Array(3, 2) where 2 indicates text format which will not remove 0.
 
Upvote 0
I will look at that, but the data comes in as text, general or something else, then when text to columns is done it seems show (dont know what is is technically called) the equation for that number in some cells. Then I reformat to number and it will turn those into numbers but the cells lose the zero in front. Can not find the perfect combination to get it all to text showing as a number.
I think there should be some better code than the text to column?
 
Upvote 0

Forum statistics

Threads
1,224,352
Messages
6,178,068
Members
452,822
Latest member
MtC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top