Text to Columns - Delimited with a really weird issue with scientific notation after running

jlax2485

New Member
Joined
Mar 24, 2017
Messages
6
Hi,

I am running into a strange problem and I haven't been able to find a suitable solution to it. I have a macro which I am running a text-to-columns on a column filled names and ID's sandwiched together like this:

465E10^JONES, JOHN.

The text to columns work fine with the consistent ^ delimiter, but the problem with this specific instance, is that once the above string is split, excel treats it as scientific notation, and the cell value immediately turns into the number 4650000000000.

I have tried different things to work around this...basically everything in my application depends on this ID number, and if it does not format correctly then my subs will not work.

Is there anything I could do to work around this issue in VBA? This is the first instance of this happening out of hundreds of ID's, but I am sure it will come up again.

Thanks for your help.

Josh
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
On step 3 of the text to columns wizard, select the column you're interested in & then select text, rather than general
 
Upvote 0
I am running into a strange problem and I haven't been able to find a suitable solution to it. I have a macro which I am running a text-to-columns on a column filled names and ID's sandwiched together like this:

465E10^JONES, JOHN.

The text to columns work fine with the consistent ^ delimiter, but the problem with this specific instance, is that once the above string is split, excel treats it as scientific notation, and the cell value immediately turns into the number 4650000000000.
Try adding this to the end of your TextToColumns method call in your macro...

FieldInfo:=Array(Array(1, 2), Array(2, 2))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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