Jump to content
  • 0

Function "IF" help please


techdef

Question

_almost_ got my building space/area calculator working but am getting a #/DIV 0! error (legitimately) when dividing an Area by an occupancy of 0. The zero is coming from ='Space'.'SpaceOccupancyRequirements_AreaPerOccupant'

 

Trying to avoid that by :

=IF((L6=0), 0, F6/L6) 

 

Somehow that still gives the div/0 error when there shouldnt be any division happening!? Ive tried adding ' marks to the zero to no avail.

Screen Shot 2018-11-21 at 8.59.28 AM.png

Edited by techdef
Link to comment

5 answers to this question

Recommended Posts

  • 0

hmm, that doesnt quite align with the way I read the man files & the example: 

 

if ((logical_test), value_if_true, value_if_false)

Use value_if_true if logical_test is true, value_if_false if logical_test is false.

Use this function to conduct conditional tests on values and formulas and to branch based on the results of that test. The outcome of the test determines the value returned by the If function. The logical_test can be any value or expression that can be evaluated to true or false. Up to seven If statements can be nested as value_if_true, value_if_false arguments. Boolean statements within an if statement must be in parentheses. Text within an if statement should be enclosed within quotation marks.

Examples:

●    =if(('Existing Tree'.'Condition'='Not Set'), '-', 'Existing Tree'.'Condition') If no condition value was set for the existing tree object, the value in this cell is a dash; otherwise, the value in this cell is the condition value that was set for the tree object.

 

IsError and SumIf seem painfully missing!

Link to comment
  • 0

Finally have a workaround. Next time you seek an IsError function try something like this:

 

=IF(L18>=0.01, M18, 0)

 

This evaluates L18 as being a positive number. If it is, then M18 is the answer, if not, it shows 0. Turns out a div/0 error is less than 0.01, so this if test works and shows a zero instead of an error message.

Edited by techdef
Link to comment
  • 0

I have a similar problem with the #DIV0! on a vw spreadsheet. Have tried using the IFERROR function to get rid of it which doesn't seem to work in VW. Then tried @techdef's workaround. Unfortunately that didn't work either.

 

I've created a seperate thread on this. Would appreciate any help! Thanks

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...