excel - Converting Odd Date Format Into a Number -


I have a VBA script that pulls data into a single page:

The problem is that when it pastes the "MP" field in Excel, it comes in a weird format. For example, in the first line, Kevin Love is shown with 39:42, but it is shown in Excel as 15:42, and when I click on it, the value is actually 1/1/1900 3:42:00 pm

I tried to change the format of the column which imports it and is importing it again, but it gives the same result.

Ideally I can do it as 39.66 (39 minutes and 40 seconds seconds) but if it came in the form of text with colon, then I can work it out.

Any help would be greatly appreciated!

EDIT: This is my current code, if it helps:

Excel handles time values ​​unfortunately. ":" Different numbers are HH: MM [: SS], even if you prefer MM: SS and, after import, the formatting of the column is too late. Thus, "39:42" is explained as 24 hours to 15 hours: 42 meanings, which in turn are interpreted as 3:42:00 PM.

Solution:

  1. If you have control over CSV export, you can export MP3 to '39: 42 (Notice opening apostography) ), Causing Excel to interpret this as a string, which you can later parse with a relevant function. So far the easiest solution, because everyone will benefit.

  2. If you save the CSV file, you can control the column format during Excel Open / Import, to change it. Click on the Data tab> import from the text button, then move through the import.

  3. If you do not have control over export, then in the form of a test, ([0- 9] [0- 9] :) with '\ & amp; . Now, I have '39: 42 (If you do not understand this, see "Regular Expression.") Surely, you can copy the change using something like Perl, if it is a regular thing Anyway, change your table, and load the CSV file in general.


Comments