Reputation: 11
Hi everyone noob here looking for help,
I am trying to make a spreadsheet with 4 columns: A - Date; B - Multiple Currency Values with ($,€,£); C -Exchange rate; D - B*C
In all rows depending on the symbol portraited in the cell in column B, I want the cell in column C to show the exchange rate of that currency to Euros in the date in the cell in column A, so I can then multiply the value to the exchange rate and get it in Euros.
The formula I am trying to use in Column C sure is wrong but might have something right in it, could you help me debug it please?
=IF(REGEXMATCH($B3,"£"),index(GOOGLEFINANCE("CURRENCY:GBPEUR", "price", $A3), 2, 2), IF(REGEXMATCH($B3,"$"),index(GOOGLEFINANCE("CURRENCY:USDEUR", "price", $A3), 2, 2), IF(REGEXMATCH($B3,"€"),index(GOOGLEFINANCE("CURRENCY:EUREUR", "price", $A3), 2, 2),"")))
Thanks,
Upvotes: 0
Views: 357
Reputation: 1
format B column as Plain text
use in C2 and drag down:
=IF(REGEXMATCH(B2, "£"),
INDEX(GOOGLEFINANCE("CURRENCY:GBPEUR", "price", A2), 2, 2),
IF(REGEXMATCH(B2, "\$"),
INDEX(GOOGLEFINANCE("CURRENCY:USDEUR", "price", A2), 2, 2),
IF(REGEXMATCH(B2, "€"), 1, )))
use in D2:
=ARRAYFORMULA(IFNA(REGEXEXTRACT(B2:B, "\d+.\d+|\d+")*C2:C))
Upvotes: 1