Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Lacking any brain power!!! (Excel 97 and >)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Loungers

    OK what form of a worksheet formula will I need to use to pick from a list?

    For example if I have something like =SomeFormula(A1,("Monday,Tuesday,Wednesday,Thursda y,Friday,Saturday,Suday")) then if A1 has 3 the formula will evaluate to Wednesday. If A1 has 7 the formula will evaluate to Sunday.

    What will be the form of SomeFormula?

    Thanks a lot for helping me when I am not with my full capacity

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  2. #2
    3 Star Lounger
    Join Date
    Oct 2002
    Location
    Ross-on-Wye, Herefordshire, United Kingdom
    Posts
    212
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Lacking any brain power!!! (Excel 97 and >)

    =INDEX({"Monday","Tuesday","Wednesday","Thursday", "Friday","Saturday","Suday"},A1)

    Will work..

    Regards
    Peter

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Lacking any brain power!!! (Excel 97 and >)

    =CHOOSE(A1,"Monday","Tuesday","Wednesday","Thursda y","Friday","Saturday","Sunday")
    will also work with a list

    Also you could use the simple formula:
    =A1+1
    and formatting is as (no quotes): "dddd" to display the weekdays

    or place the names of the weekdays in the cells (eg) B1:B7 and using:
    =index(B1:B7,A1)

    Steve

  4. #4
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Lacking any brain power!!! (Excel 97 and >)

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> Peter

    I am suffering from a huge summer cold <img src=/S/headthrob.gif border=0 alt=headthrob width=15 height=15>, and I need to get in bed <img src=/S/nosleep.gif border=0 alt=nosleep width=27 height=15> and rest, but I have this project that I need to work on.

    Is there a limit, of how many items I can lookup, to the Index function, or maybe I'll hit the max length of the formula before I have a limit?

    Thanks a million.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  5. #5
    3 Star Lounger
    Join Date
    Oct 2002
    Location
    Ross-on-Wye, Herefordshire, United Kingdom
    Posts
    212
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Lacking any brain power!!! (Excel 97 and >)

    Wassim.. hope the cold improves... in terms of your question.. Don't no.. but:

    =INDEX(A:A,65536)

    Works without problems.. i.e. Using ALL of column A as the array with the values works ok..

    Regards
    Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •