Thanks for reply. Yes, if it was just for Excel I'd make a user defined function that returned a text value. I wanted the formula to work the same on Libre/Open office and on Google sheets so I went for an actual spreadsheet formula. Actually, the ';' separator came from the LibreOffice version.
'$' signs for A1? I'd still need to search and replace for A1 each time I needed to convert an angle in a different cell but I take your point that I could move the output around more easily. Speed does not seem to be an issue (the rest of the spreadsheet has calls to trig functions by the score)
Not sure about the cross compatibility to Libre and Google, but in Excel at least, replace your cell references with INDIRECT() references. Then store the cell you want to calculate on in another cell…say A1 (literally just type C1 in A1). Then reference with INDIRECT(“&$A$1&”). Saves you the search and replace for A1. Also works great if you want to copy formulas across tons of columns and maintain the correct column header references as you can insert the INDIRECT reference into table notation.
Thanks for your reply. I am aware of the absolute cell reference notation and use it frequently when I have a set of constants (e.g. longitude, latitude, year, month, day, timezone &c) that are referenced in many formulas. However the situation in my post was the other way round sort of.
As a concrete example (just in case I've mis-understood the situation), I have the right ascension, declination and phase angle of Venus as decimal angles in cells G80, H80 and M80 and I want the output strings in cells F3, G3 and H3. I still need to search and replace the A1 cell reference in my original post for each of the formulas.
As the poster a couple levels above pointed out I could do this as a user defined function in VBA, but I wanted my daft spreadsheet to work on Libre/Open office and on Google sheets with little or no modification. Hence the chain of if statements and round() functions.
'$' signs for A1? I'd still need to search and replace for A1 each time I needed to convert an angle in a different cell but I take your point that I could move the output around more easily. Speed does not seem to be an issue (the rest of the spreadsheet has calls to trig functions by the score)