Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board

Go Back   Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board > Off Topic > Off Topic - Computers


Reply
 
Thread Tools Rate Thread
Old 09-13-2021, 04:16 PM   #1
Tom
The Voice of Reason!
 
Tom's Avatar
 
Join Date: Mar 2001
Location: Canandaigua, New york
Posts: 112,787
OO Calc question

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?

Attached Images
File Type: jpg if.JPG (31.1 KB, 23 views)
File Type: jpg if2.JPG (25.8 KB, 13 views)
__________________
Who does the Racing Form Detective like in this one?
Tom is offline   Reply With Quote Reply
Old 09-13-2021, 04:40 PM   #2
Kbatch57
Registered User
 
Join Date: Dec 2020
Posts: 69
=IF(C4>0,AVERAGE(C44),"---")

Works for me!

Attached Images
File Type: png Formula both 0 value.PNG (3.8 KB, 7 views)
File Type: png Formula C4=0 or blank and D4=82.PNG (4.1 KB, 9 views)
File Type: png C4 & D4 populated.PNG (3.9 KB, 8 views)
File Type: png C4 & D4 Blank.PNG (4.6 KB, 6 views)

Last edited by Kbatch57; 09-13-2021 at 04:45 PM.
Kbatch57 is offline   Reply With Quote Reply
Old 09-13-2021, 07:20 PM   #3
Tom
The Voice of Reason!
 
Tom's Avatar
 
Join Date: Mar 2001
Location: Canandaigua, New york
Posts: 112,787
I can get it if I put a 0 in C4, but not if I leave it blank.
Are you using Libre OO?

Thanks
__________________
Who does the Racing Form Detective like in this one?
Tom is offline   Reply With Quote Reply
Old 09-13-2021, 07:30 PM   #4
Kbatch57
Registered User
 
Join Date: Dec 2020
Posts: 69
Quote:
Originally Posted by Tom View Post
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.
Kbatch57 is offline   Reply With Quote Reply
Old 09-13-2021, 08:54 PM   #5
tupper
Registered User
 
tupper's Avatar
 
Join Date: Jan 2007
Location: Los Angeles
Posts: 492
Libreoffice:


Last edited by tupper; 09-13-2021 at 09:01 PM.
tupper is offline   Reply With Quote Reply
Old 09-14-2021, 10:08 AM   #6
Red Knave
dGnr8
 
Red Knave's Avatar
 
Join Date: Aug 2003
Location: Niagara, Ontario
Posts: 3,023
Quote:
Originally Posted by Tom View Post
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.
__________________
.
The great menace to progress is not ignorance but the illusion of knowledge - Daniel J. Boorstin

The takers get the honey, the givers sing the blues - Robin Trower, Too Rolling Stoned - 1974
Red Knave is offline   Reply With Quote Reply
Old 09-14-2021, 11:11 AM   #7
tupper
Registered User
 
tupper's Avatar
 
Join Date: Jan 2007
Location: Los Angeles
Posts: 492
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.
tupper is offline   Reply With Quote Reply
Old 09-14-2021, 05:11 PM   #8
cj
@TimeformUSfigs
 
cj's Avatar
 
Join Date: Jan 2002
Location: Moore, OK
Posts: 46,827
This should work:

=IF(OR(C4<=0,C4=""),"---",AVERAGE(C4,D4))
cj is offline   Reply With Quote Reply
Old 09-14-2021, 10:14 PM   #9
Tom
The Voice of Reason!
 
Tom's Avatar
 
Join Date: Mar 2001
Location: Canandaigua, New york
Posts: 112,787
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.
__________________
Who does the Racing Form Detective like in this one?
Tom is offline   Reply With Quote Reply
Old 09-14-2021, 10:47 PM   #10
Tom
The Voice of Reason!
 
Tom's Avatar
 
Join Date: Mar 2001
Location: Canandaigua, New york
Posts: 112,787
I just stumbled onto the secret.

If I clear both C and D columns, E goes blank, which is what I wanted.
Everything worked then.
__________________
Who does the Racing Form Detective like in this one?
Tom is offline   Reply With Quote Reply
Old 09-14-2021, 11:19 PM   #11
geroge.burns99
Veteran
 
Join Date: May 2021
Location: NYC
Posts: 1,554
Quote:
Originally Posted by Tom View Post
I just stumbled onto the secret.

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....
geroge.burns99 is offline   Reply With Quote Reply
Old 09-15-2021, 11:23 AM   #12
cj
@TimeformUSfigs
 
cj's Avatar
 
Join Date: Jan 2002
Location: Moore, OK
Posts: 46,827
Quote:
Originally Posted by Tom View Post
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.

Attached Images
File Type: png Calc.png (11.5 KB, 15 views)
cj is offline   Reply With Quote Reply
Old 09-16-2021, 01:44 PM   #13
Tom
The Voice of Reason!
 
Tom's Avatar
 
Join Date: Mar 2001
Location: Canandaigua, New york
Posts: 112,787
I discovered today that most everything works if I actually delete the cell contents, not just clear it by hitting the spacebar.
__________________
Who does the Racing Form Detective like in this one?
Tom is offline   Reply With Quote Reply
Old 09-16-2021, 05:02 PM   #14
cj
@TimeformUSfigs
 
cj's Avatar
 
Join Date: Jan 2002
Location: Moore, OK
Posts: 46,827
Quote:
Originally Posted by Tom View Post
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!
cj is offline   Reply With Quote Reply
Old 09-17-2021, 08:21 AM   #15
Red Knave
dGnr8
 
Red Knave's Avatar
 
Join Date: Aug 2003
Location: Niagara, Ontario
Posts: 3,023
Quote:
Originally Posted by Tom View Post
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))
__________________
.
The great menace to progress is not ignorance but the illusion of knowledge - Daniel J. Boorstin

The takers get the honey, the givers sing the blues - Robin Trower, Too Rolling Stoned - 1974
Red Knave is offline   Reply With Quote Reply
Reply




Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

» Advertisement
» Current Polls
Wh deserves to be the favorite? (last 4 figures)
Powered by vBadvanced CMPS v3.2.3

All times are GMT -4. The time now is 11:12 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 1999 - 2023 -- PaceAdvantage.Com -- All Rights Reserved
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program
designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.