Nested If Function...Please Help

  • Thread starter Thread starter Marlene
  • Start date Start date
M

Marlene

Need some help on Nested if function. The question is to write a neste
if function which will translate a numeric value into a day of th
week.

Day
1=Mon
2=Tue
3=Wed
4=Thu
5=Fri
6=Sat
7=Sun

My answer was incorrect somehow and I had written down a
=if(a2=2,tue, if(a2=3,wed, if(a2=4,thu, if(a2=5,fri, if(a2=6,sat=i
(a2=7,sun, "invalid")))))))

What can I do to make this work
 
For starters, you can look back at the multiple replies to your
earlier post in the microsoft.public.excel newsgroup.

If you can't access them through ExcelTip/Forum, you can look at the
archives:

http://google.com/advanced_group_search?q=group:*excel*

using your name or email address in the Author field. Note that it
may take several hours for posts to show up.
 
J.E. McGimpsey said:
For starters, you can look back at the multiple replies to your
earlier post in the microsoft.public.excel newsgroup.

If you can't access them through ExcelTip/Forum, you can look at the
archives:
....

Don't fret. ExcelForum carries microsoft.public.excel as well as it does any
of the other Excel newsgroup - meaning it may not catch all posts. I just
came across a case in which Google carried a response from Ken Wright that
ExcelForums missed.

ExcelForums users: be warned - the newsgroup portal you're using may not be
complete, and its interface is much cruder than most newsreaders despite all
the eyewash and useless artwork on its pages. WAWOBW
 
Hi Marlene,
Nice homework problem. Nesting is permitted to 7 deep. Try one of these:


=IF(AND(A2>=1,A2<=7),INDEX({"Mon","Tue","Wed","Thur","Fri","Sat","Sun"},A2),
"Invalid")

=IF(AND(A2>=1,A2<=7),CHOOSE(A2,"Mon","Tue","Wed","Thur","Fri","Sat","Sun"),"
Invalid")

Bernard
 
Back
Top