|
|
|
|
|
by 2b3a51
1497 days ago
|
|
Amateur user of Excel/Calc/Google sheets here. My worst is... =CONCATENATE(
IF(A1<0;"-";"+");
TEXT(INT(ABS(A1));"00") ;"d";
IF((ABS(A1) - INT(ABS(A1)) - INT( (ABS(A1) - INT(ABS(A1)))*60 )/60) * 3600 > 59.5;
TEXT(INT((ABS(A1) - INT(ABS(A1)))*60)+1;"00");
TEXT(INT((ABS(A1) - INT(ABS(A1)))*60);"00")
);"m";
IF((ABS(A1) - INT(ABS(A1)) - INT( (ABS(A1) - INT(ABS(A1)))*60 )/60) * 3600 > 59.5;
TEXT(0;"00");
TEXT(ROUND( (ABS(A1)-INT(ABS(A1))-INT((ABS(A1)- INT(ABS(A1)))*60)/60)*3600;0 );"00")
);"s"
)
...which should take a value in cell A1 that is in the range [0,360) and return the value in angle notation (degrees, minutes and seconds). I especially wanted this function all in one cell to save loads of helper cells (the spreadsheet calculates the position of the moon, sun, planets and a physical ephemeris for each planet so a lot of angles to display).It is a pain to apply, I use a text editor to search and replace the cell reference for each angle. I'd settle for the formula bar display of the formula not reformatting the line breaks. |
|
I'm not sure this works with LibreOffice though. Probably not.