Column A, is the description of the product purchased, which is just plain text.

Column B and C are the price of the product in USD and LBP respectively.
Now, when I buy a product, sometimes I purchase it in USD, sometimes in LBP. So I want to add in its respective column, and when doing so, the other column will be automatically calculated and filled.
The circular dependency in these cells are not a problem to me and totally understandable.

Issue

My problem are the cells B2 and C2, the first time I wrote the function, it worked like a charm. But after closing the document, the result of the function is a #REF Error. But if I edit the cell, and rewrite the same function, it returns the correct value. This has to be done, every time I reopen the document.

Am I doing something wrong? Or is this just a bug?

Is there another/better way to accomplish what I want? (Which is, price is available in both currencies, and if I input one currency, the second one is calculated automatically. And a cell with the total value of each currency)

The other way you can solve this is with JavaScript, if you know it, using the onEdit trigger. In that case the JavaScript would detect the edit to B3 and automatically add the formula in C3, or vice versa.