Importing colon-separated fields

midsession

Board Regular
Joined
Oct 12, 2006
Messages
70
Hello MrExcel

I am importing tables via WebQuery where some columns contain data separated by a colon. I can split the data using TextToColumns, but I can't get the worksheet to display the data 'as is' -it insists on treating it as a time. For instance ...
If I import 0:3 worksheet displays 12 and 3
If I import 13:3 worksheet displays 1 and 3

Worse than that, when I record a macro, the split and copy seems to work fine. When I rerun the macro it reverts to reading 17:06 as 5 and 06!

Can anyone help?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

midsession

Board Regular
Joined
Oct 12, 2006
Messages
70
Makes no difference whether NumberFormat is General or @ before TextToColumns

On TextToColumns, FieldInfo is currently Array(Array(1, 2), Array(2, 2), Array(3, 9)). This setup is due to the fact that Excel reads the cell format as custom hh:mm, with the consequence that when you run TextToColumns manually it thinks it has three fields to split (17:06:00).
Again, no diff if setup is Array(Array(1, 1), Array(2, 1), Array(3, 9)).
 

midsession

Board Regular
Joined
Oct 12, 2006
Messages
70
Are people not able to replicate this problem? Maybe it's a date-reading system setting rather than the code ...
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,128
Messages
5,857,529
Members
431,883
Latest member
Hien

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
Top