View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default simple IF question

=if(or(a1={1,2}),"A",if(or(a1={3,4,5}),"B","not 1, 2, 3, 4, or 5"))

or

=if(or(a1=1,a1=2),"A",if(or(a1=3,a1=4,a1=5),"B","n ot 1, 2, 3, 4, or 5"))

bokey wrote:

How do I write a formula that would evaluate a cell and return different
values?

IF cell = 1 or 2, return "A", if cell = 3, 4 or 5, return "B"


--

Dave Peterson