OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Problem using IF

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
kenmac
General User
General User


Joined: 25 Feb 2005
Posts: 30
Location: Perth, Western Australia

PostPosted: Fri Feb 25, 2005 11:00 pm    Post subject: Problem using IF Reply with quote

Hi folks,
I use 1.1.4

The following example describes the problem:

2 cells (a1, b1) are used for number entry.
Cell c1 displays the sum of a1 and b1. ( =a1+b1 )
If no data is present in a1, b1 then cell c1 displays #VALUE!
As I would rather it display a 0 , I decided to use a conditional formula.
So, I changed c1 to be =IF(a1=0,0,a1+b1).
This should have forced c1 to show 0 when a1 is empty.
Wrong!
It displays #NAME?
????
Does anyone know what is happening here?
Is there a format action that I have missed?

It works on other spreadsheets (MSWorks, Excel, etc)

kenmac
Back to top
View user's profile Send private message
8daysaweek.co.uk
Super User
Super User


Joined: 29 Nov 2003
Posts: 2130
Location: UK

PostPosted: Sat Feb 26, 2005 1:18 am    Post subject: Reply with quote

Try semi-colons instead of commas Wink

To test for "no data" I would probably test if a1="" rather than testing if a1=0 - but as you say it works in Works and Excel then you're probably OK Smile

BFN,
_________________
James
www.8daysaweek.co.uk - A User-Focused OOo site
Back to top
View user's profile Send private message Visit poster's website AIM Address
kenmac
General User
General User


Joined: 25 Feb 2005
Posts: 30
Location: Perth, Western Australia

PostPosted: Sat Feb 26, 2005 1:33 am    Post subject: Reply with quote

Ah !
You are correct.
I didn't pick up on the use of semicolons when I checked the Help info.
Thanks for that.

kenmac
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group