Skip to main content
Solved

IF OR formula with multiple columns

  • July 21, 2020
  • 2 replies
  • 31 views

I have two columns, one for USD price and EUR price. I want these prices to automatically be converted to DKK (Danish crowns), so:

USD price*6.51 = DKK price

or

EUR price*7.44 = DKK price

So, if there is a value in the USD price column, this value gets multiplied by 6.51 and the result is displayed in the DKK price column. If there is no value under USD, then it takes the EUR price instead.

So far I have added this formula:

IF(OR({Realized price (USD)}>0,{Realized price (EUR)}>0),{Realized price (USD)}*6.52,{Realized price (EUR)}*7.45)

But this only takes into account USD price. If USD is empty it will return a value of 0 and disregard EUR price.

Best answer by Mohamed_Swella1

Hi @MIX_CPH,

The reason is you don’t need an OR argument, because this would actually mean that even if the USD price is empty but the EUR price is not, it will also multiply the USD price (which us zero).

You should use the same formula without the OR and no need to have > 0

So the formula would be

IF({Realized price (USD)},{Realized price (USD)}*6.52,{Realized price (EUR)}*7.45)

If this helps you, please mark it as Solution so others would see it.

BR,
Mo

2 replies

Mohamed_Swella1
Forum|alt.badge.img+17

Hi @MIX_CPH,

The reason is you don’t need an OR argument, because this would actually mean that even if the USD price is empty but the EUR price is not, it will also multiply the USD price (which us zero).

You should use the same formula without the OR and no need to have > 0

So the formula would be

IF({Realized price (USD)},{Realized price (USD)}*6.52,{Realized price (EUR)}*7.45)

If this helps you, please mark it as Solution so others would see it.

BR,
Mo


  • Author
  • New Participant
  • July 21, 2020

Hi @MIX_CPH,

The reason is you don’t need an OR argument, because this would actually mean that even if the USD price is empty but the EUR price is not, it will also multiply the USD price (which us zero).

You should use the same formula without the OR and no need to have > 0

So the formula would be

IF({Realized price (USD)},{Realized price (USD)}*6.52,{Realized price (EUR)}*7.45)

If this helps you, please mark it as Solution so others would see it.

BR,
Mo


Of course! That makes sense - thank youuuu