Im using Excel 2010 I am having trouble extracting the correct values from a RA and DEC values. I want to extract each value from the RA and DEC and place the deg, min, sec in separate columns.
Essentially just rewrite the values in separate columns. I cant do this individually as i have over 3500 items to convert.
Eg.
column A .....| B ...| C .| D
19:24:59.38 | 19 | 24 | 59.38
Here is what i have at the moment. The RA appears as '7:24:59 PM' in the text bar formatted as time "[h]:mm:ss.s" this appears as 19:24:59.59 in the cell A1.
to get deg:B1 = TEXT(TRUNC(A1,2)*24,"00") --> this produces 19 - correct
to get min:C1 = MID((TRUNC(A1,5)*24-B1)*60,1,2) --> this produces 24 - correct
to get sec:D1 = MID((((TRUNC(A1,5)*24-B1)*60)-C1)*60,1,5) --> this produces 58.46 - wrong. This should be 59.59 (decimal form) or preferably 59.38 (decimal degrees)
Can anyone tell me how to extract the correct values?
Thanks in advance.