Small programming task in Excel VBA
So we now have to format the pseudo-time part bit, and we can do that in
the
formula by using the TEXT function
=TEXT(ABS(A1/24),"[h].mm.ss")
which gives us the same result as above if we had used custom cell
formats.
Put it all together, and we finally have in B1
=TEXT(ABS(A1/24),"[h].mm.ss") & IF(A1<0,"S","N")
and I think that this is exactly what you want, so just copy it down
column
Bob,
Can you explain the format "[h].mm.ss"............I don't understand the
square brackets around the "h". When 26.1234 is in A1 and I remove the
brackets from the formula it displays a 2 instead of 26. I don't understand
and can't find documentation on that type of format. Can you explain?
Regards. -Guy
|