Bug in Text to columns.

Revathi

New Member
Joined
May 26, 2015
Messages
34
Hi,

I have automated a small part for "Text to columns" but recently i have noticed after doing the text to columns it is reflecting in a some other format eg. Correct data - 18110274E9 AFTER AUTOMATED - 1.181E+16.

:confused::confused::confused:
Please can someone help me on this.. if it is required i will share my file to you. The below is the code which i have used for Text to columns..

Thanks.


Sub Sample5()
Worksheets("Test").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A22:A600").Select
Selection.TextToColumns Destination:=Range("A22"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(8, 1), Array(12, 1), Array(30, 1), Array(51, 1), _
Array(64, 1), Array(77, 1), Array(92, 1), Array(101, 1), Array(122, 1), Array(127, 1), _
Array(132, 1), Array(134, 1), Array(137, 1), Array(145, 1), Array(162, 1), Array(176, 1)) _
, TrailingMinusNumbers:=True
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Re: Bug in Text to columns. Please help

In the FieldInfo array try using 2 (Text) instead of 1 (General) for the column data type.
 
Upvote 0
Re: Bug in Text to columns. Please help

Thanks a lottttttttttttttttttt. you really made my day.. thank you so much
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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