Skip to main content
Solved

Piece of IF formula not returning a result

  • September 17, 2021
  • 2 replies
  • 17 views

I am having trouble with the second IF part of this formula, it doesn’t return any results. I also tried it on it’s own and it still doesn’t return a result.
IF({Writer Owned (adds up to 100%)}=.33330, VALUE(“16.66”), IF({Writer Owned (adds up to 100%)}=.33340, VALUE(“16.68”)))

Best answer by augmented

Hi Christine. Dealing with floating point numbers (numbers with decimals) can sometimes be squirrely. I don’t know what’s going on here, I tried replicating your issue and was able to. However, there are some things you should change about your formula. First, you don’t need to use VALUE(number string). You should just use the number (e.g. 16.68). Second, the only way I could get what you wanted was to use the FLOOR function.

IF({Writer Owned (adds up to 100%)}=0.3333, 16.66, IF(FLOOR({Writer Owned (adds up to 100%)}, 0.00001)=0.3334, 16.68))

Let us know if that works for you.

2 replies

Forum|alt.badge.img+18
  • Inspiring
  • Answer
  • September 17, 2021

Hi Christine. Dealing with floating point numbers (numbers with decimals) can sometimes be squirrely. I don’t know what’s going on here, I tried replicating your issue and was able to. However, there are some things you should change about your formula. First, you don’t need to use VALUE(number string). You should just use the number (e.g. 16.68). Second, the only way I could get what you wanted was to use the FLOOR function.

IF({Writer Owned (adds up to 100%)}=0.3333, 16.66, IF(FLOOR({Writer Owned (adds up to 100%)}, 0.00001)=0.3334, 16.68))

Let us know if that works for you.


  • Author
  • New Participant
  • September 17, 2021

Hi Christine. Dealing with floating point numbers (numbers with decimals) can sometimes be squirrely. I don’t know what’s going on here, I tried replicating your issue and was able to. However, there are some things you should change about your formula. First, you don’t need to use VALUE(number string). You should just use the number (e.g. 16.68). Second, the only way I could get what you wanted was to use the FLOOR function.

IF({Writer Owned (adds up to 100%)}=0.3333, 16.66, IF(FLOOR({Writer Owned (adds up to 100%)}, 0.00001)=0.3334, 16.68))

Let us know if that works for you.


That seems to have worked, thank you!