Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When exporting data from another application as an excel worksheet I
end up with it in the following format. Stat 1 Stat 2 Person1 01:16:00 01:09:25 Person2 :18 :49:12 I want to macro that will convert all the data in the range to "hh:mm:ss". Just applying data type cell formatting as hh:mm:ss does not fix the values for Person2 and seems excel just treats it as text. What is the most efficient way to do a check of all the data and then fix the value of the data that is not in the correct format to hh:mm:ss. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave,
It work almost fine, just that I should have clarified that the data Person1, Stat2 01:09:25 when taken to excel is actually in the correct format (hh:mm:ss) and does not need to be converted to anything, it just needs to be left alone. How can I tweak the formula to include this possibility. thanks. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You'd have to use a different formula in column in E1.
=IF(ISNUMBER(d1),d1,IF((LEN(d1)-LEN(SUBSTITUTE(d1,":","")))=1, --("0"&d1)/60,--("0"&d1))) But I'm not sure what :49:12 meant. So that last portion is still a guess. wrote: Thanks Dave, It work almost fine, just that I should have clarified that the data Person1, Stat2 01:09:25 when taken to excel is actually in the correct format (hh:mm:ss) and does not need to be converted to anything, it just needs to be left alone. How can I tweak the formula to include this possibility. thanks. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
correct syntax for nesting "if", "and", and "vlookup"....if possib | Excel Worksheet Functions | |||
VLOOKUP won't generate correct response for "inbetween" values | Excel Discussion (Misc queries) | |||
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" | Excel Programming | |||
Convert "Month" to "MonthName" format from db to PivotTable | Excel Programming |