robzinn
(Rob Zinn)
March 5, 2020, 5:01pm
1
The AND() function in Formula Columns should only return true only if BOTH arguments are true, right?
That does not seem to be the case. This formula will produce a “Can’t Divide by 0” error when {column2} is blank OR zero…
IF(
AND(
{column1}<>0,
{column2}<>0
),
{column1}/{column2}
)
1 Like
dipro
(Dipro Bhowmik)
March 11, 2020, 9:14pm
2
Hey @robzinn – thanks for posting this here! This is a known issue that our developers have been made aware of.
I’ll add your note to the open issue, so our devs know you’re asking for it as well.
peppinob
(Giuseppe)
March 29, 2021, 6:01pm
3
Hi @dipro any update on this? thanks
PolishedGeek
(Polished Geek | Platinum Partner)
March 29, 2021, 6:39pm
4
Hi, @peppinob - For now, we work around this issue by adding a check in our formulas that inserts “N/A” into the column if a zero would cause an error and/or result in an incorrect value. Would that help in your situation?
1 Like
JCorrell
(Jim - The Monday Man)
March 29, 2021, 8:36pm
5
Here are two ways to make this work. (For both of these, added null string to the else portion of the if statement to prevent a false return value.)
The first, make all parts of a formula always work:
IF(AND({column1}<>0,{column2}<>0),{column1}/IF({column2}<>0,{column2},1),"")
Second, use the DIVIDE function instead of the operation:
IF(AND({column1}<>0,{column2}<>0),DIVIDE({column1},{column2}),"")
5 Likes
peppinob
(Giuseppe)
March 30, 2021, 9:14am
6
@JCorrell @PolishedGeek
Thank you for your advices, it helped a lot!
system
(system)
Closed
May 6, 2021, 10:54am
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.