- - OO Calc question
( http://www.paceadvantage.com/forum/showthread.php?t=166703)
OO Calc question
2 Attachment(s)
I am trying to do an if/then formula and can't get to work.
C4 and D4 are input numbers. I want E4 to be the average of these, but I want it to be a blank cell or show --- if there is nothing in cell C4.
What happens if I clear C4 is the value of D4. If I clear both cells, I get an error /0 result.
What am I doing wrong?
|
Kbatch57 |
09-13-2021 04:40 PM |
4 Attachment(s)
=IF(C4>0,AVERAGE(C4:D4),"---")
Works for me!
|
I can get it if I put a 0 in C4, but not if I leave it blank.
Are you using Libre OO?
Thanks
|
Kbatch57 |
09-13-2021 07:30 PM |
Quote:
Originally Posted by Tom
(Post 2754004)
I can get it if I put a 0 in C4, but not if I leave it blank.
Are you using Libre OO?
Thanks
|
I am using Microsoft Office Professional Plus 2013.
|
tupper |
09-13-2021 08:54 PM |
|
Red Knave |
09-14-2021 10:08 AM |
Quote:
Originally Posted by Tom
(Post 2754004)
I can get it if I put a 0 in C4, but not if I leave it blank.
|
A blank is not a zero although OO should figure that out. Maybe put the main If inside another that is something like If(C4<>"",If(C4>0 etc.
|
tupper |
09-14-2021 11:11 AM |
There is a configurable option in LibreOffice Calc called "EmptyStringAsZero." It is likely that OpenOffice Calc has the same (or a similar) option.
Here is a relevant post.
|
This should work:
=IF(OR(C4<=0,C4=""),"---",AVERAGE(C4,D4))
|
So far, nothing works, even the formula shown above for Libre.
THANKS for the help guys.
I have had my fill of OO.
Both versions are just inferior to Excel.
Office 365 is not that expensive, time to ditch thee free shit.
|
I just stumbled onto the secret. :rolleyes:
If I clear both C and D columns, E goes blank, which is what I wanted.
Everything worked then.
|
geroge.burns99 |
09-14-2021 11:19 PM |
Quote:
Originally Posted by Tom
(Post 2754328)
I just stumbled onto the secret. :rolleyes:
If I clear both C and D columns, E goes blank, which is what I wanted.
Everything worked then.
|
Congrats!!
There's nothing wrong in looking for the cheapest way out....:headbanger:
|
1 Attachment(s)
Quote:
Originally Posted by Tom
(Post 2754315)
So far, nothing works, even the formula shown above for Libre.
THANKS for the help guys.
I have had my fill of OO.
Both versions are just inferior to Excel.
Office 365 is not that expensive, time to ditch thee free shit.
|
Not sure what happened, worked fine for me. See attached image straight from CALC with all three cases...value, 0, blank.
|
I discovered today that most everything works if I actually delete the cell contents, not just clear it by hitting the spacebar.
|
Quote:
Originally Posted by Tom
(Post 2754772)
I discovered today that most everything works if I actually delete the cell contents, not just clear it by hitting the spacebar.
|
That makes sense. You know things like that keep me up at night when it didn't work for you! :lol:
|
Red Knave |
09-17-2021 08:21 AM |
Quote:
Originally Posted by Tom
(Post 2754772)
I discovered today that most everything works if I actually delete the cell contents, not just clear it by hitting the spacebar.
|
I guess making it a space isn't the same as an empty string. Maybe adjust cj's code to something like
=IF(OR(C4<=0,TRIM(C4)=""),"---",AVERAGE(C4,D4))
|
All times are GMT -4. The time now is 12:48 AM. |
|
Powered by vBulletin® Version 3.8.9 Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 1999 - 2023 -- PaceAdvantage.Com -- All Rights Reserved
|
|