View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_3_] Alan Beban[_3_] is offline
external usenet poster
 
Posts: 130
Default when IF equals multiple values??

=IF(OR(A1=1,A1=3,A1=5,A1=8,A1=10,A1=12,A1=13,A1=15 ,A1=17,A1=20),1,2)

Alan Beban

foamfollower wrote:
Hello,
This should be easy, although for some reason........
anyway, i'm trying to say this:
IF 1or3or5or8or10or12or13or15or17or20 then 1, if not then 2.

i understand the basic true or false formula, =if(a1=1,1,2), but how
do i string the commands to assign a '1' to any of the ten above
mentioned numbers. of course, i'd like the other
numbers:2,4,6,7,9,11,14,16,18,19 to be '2'.

Any help will be greatly appreciated.

Have a Great Day!

SF