• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

simple if loop

bee123

New Member
I have come across a strange thing.Can anyone tell why is it?

eg: I have cell A1 = 10,B1=3


If I write C1

=IF(OR(A1=20;B1=3);1;0) Gives 1


But


=IF(OR(A1="20";B1="3");1;0) Gives 0


Which is right?Double quotes means text?Or which is correct ? should I put "" in writing numbers?


Please suggest.
 
Good day bee123

[pre]
Code:
=IF(A1>=15,1,0)(code in the B column)
=IF(OR(A1>=15,B1=1),2,3)(code in the C column)
A      B       C
20	1	2
10	0	3
56	1	2
14	0	3
21	1	2
[/pre]
 
Correct. If the contents of the cell is a number already, or a text string that can be converted to a number, VALUE will give the numerical value. If it's a regular text string, like "bee", it will error out.
 
Back
Top