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

(SOLVED)IF then statements

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


Joined: 13 Jan 2009
Posts: 8
Location: New Jersey

PostPosted: Wed Sep 28, 2011 4:22 am    Post subject: (SOLVED)IF then statements Reply with quote

Wonder if some one can help me with this spreadsheet problem. I have a spreadsheet with ten columns and lets say ten rows.

I would like to compare the values in A1 through J1 against the value 1. If any value in any of those ten cells equals 1, I would like to place a “Y” in L1. If it none equal 1 I would like to place a “N” in L1. all ten values will be different so that there can only be one 1 if there are any.

Can this be done? How?

What I tried was

If(A1:J1 =1; “Y”; “N”)

what that give me is “#Value”

Thanks for any help.

Bill


Last edited by frog_15537 on Wed Sep 28, 2011 5:32 am; edited 1 time in total
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Wed Sep 28, 2011 4:56 am    Post subject: Reply with quote

Quote:
If(A1:J1 =1; “Y”; “N”)

If 10 values = 1 then Y else N Question
_________________
Rest in peace, oooforum.org
Get help on http://forum.openoffice.org
Back to top
View user's profile Send private message
gerard24
OOo Enthusiast
OOo Enthusiast


Joined: 08 Jul 2011
Posts: 100
Location: France

PostPosted: Wed Sep 28, 2011 5:00 am    Post subject: Reply with quote

Code:
=IF(COUNTIF(A1:J1;1);"Y";"N")

COUNTIF(A1:J1;1) counts number of cells =1,
if the result is <>0, the IF function returns Y, is result of COUNTIF is 0, IF returns N.
_________________
LibreOffice 3.5.0 on Windows Vista
Back to top
View user's profile Send private message
frog_15537
General User
General User


Joined: 13 Jan 2009
Posts: 8
Location: New Jersey

PostPosted: Wed Sep 28, 2011 5:10 am    Post subject: If then statement Reply with quote

My apologies Villeroy but I don't understand what it is that you are suggesting.

are you asking a questions about my if statement

clarification

I want to check each individual cell A1 through J1 against the value of 1. if in any one of those individual cells there is a 1, I want to put a Y in L1. Otherewise I want to put an N.

I tried putting in the :"then" and the "else" in the statement but that doesn't help.

Not sure what you meant by "10 values".

My knowledge of Calc is very limited.

thanks for trying

Bill
Back to top
View user's profile Send private message
frog_15537
General User
General User


Joined: 13 Jan 2009
Posts: 8
Location: New Jersey

PostPosted: Wed Sep 28, 2011 5:29 am    Post subject: If then statement Reply with quote

thank you very muchy gerard24. that works just the way I wanted it too.

thanks to all who looked and especially to those who answered me.

Bill
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