Short answer
One can't completely build a formula out of text strings, there is nothing like =formula("=A1+B1")
in the Sheets. But one can improve presentation by (a) preparing complex parameters in separate cells, and (b) using whitespace within a formula.
Whitespace
Spreadsheet formulas don't have to be squeezed in one line. The formula bar can be stretched vertically, and linebreaks can be created with Ctrl-Enter (or by preparing the formula in text editor). This already improves readability:
(The linebreak/indents here could be better, this is just a quick example.)
Parameters
When using complex query
formulas it is advisable to form query strings separately, so that they can be debugged more easily. So you'll have one cell with
="select K,J,I,H,G,F where
A='"&$E3&"' and
B='"&$B3&"' and
C="&$C3&" and
D="&$D3&" and
E='"&$G3&"'"
and another with
="select J,I,H,G,F,E where
A='"&$E3&"' and
B='"&$B3&"' and
C="&$C3&" and
D="&$D3&""
and then the main formula will refer to those strings. If they are named ranges FirstQuery and SecondQuery, the main formula will be
=IF(F3="", , IFERROR(
IF(C3<MinMaraDur,
HLOOKUP(F3, {
QUERY(RankData, FirstQuery, 0);
"III","II","I","CMS","MS","MSIC"
}, 2),
HLOOKUP(F3, {
QUERY(MaraRankData, SecondQuery,0);
"III","II","I","CMS","MS","MSIC"
}, 2)
),
))
which I think is pretty readable.
The function googlefinance
provides the current exchange rates for all these currencies. For example, this converts the amounts in A1, B1, C1, D1 from (GBP, EUR, DKK, SKK) to GBP, and adds them.
=A1 + B1*googlefinance("currency:EURGBP")
+ C1*googlefinance("currency:DKKGBP")
+ D1*googlefinance("currency:SKKGBP")
Best Answer