+ Reply to Thread
Results 1 to 4 of 4

convert weekday string to number

  1. #1
    nico
    Guest

    convert weekday string to number

    Is there an easy way to convert a string which is either "Monday" thru
    "Sunday" into a number to work with? In particular, I want to add a 1 if the
    cell contains "Monday", 2 if "Tuesday" etc.

    Any ideas?
    Thanks!

  2. #2
    Don Guillett
    Guest

    Re: convert weekday string to number

    Have a look in HELP index for LOOKUP

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "nico" <[email protected]> wrote in message
    news:[email protected]...
    > Is there an easy way to convert a string which is either "Monday" thru
    > "Sunday" into a number to work with? In particular, I want to add a 1 if

    the
    > cell contains "Monday", 2 if "Tuesday" etc.
    >
    > Any ideas?
    > Thanks!




  3. #3
    CLR
    Guest

    Re: convert weekday string to number

    =LOOKUP(A1,{"Friday",5;"Monday",1;"Saturday",6;"Sunday",7;"Thursday",4;"Tues
    day",2;"Wednesday",3})

    Vaya con Dios,
    Chuck, CABGx3


    "nico" <[email protected]> wrote in message
    news:[email protected]...
    > Is there an easy way to convert a string which is either "Monday" thru
    > "Sunday" into a number to work with? In particular, I want to add a 1 if

    the
    > cell contains "Monday", 2 if "Tuesday" etc.
    >
    > Any ideas?
    > Thanks!




  4. #4
    Bob Phillips
    Guest

    Re: convert weekday string to number

    =MATCH(A1,{"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Su
    nday"},0)

    --
    HTH

    Bob Phillips

    "nico" <[email protected]> wrote in message
    news:[email protected]...
    > Is there an easy way to convert a string which is either "Monday" thru
    > "Sunday" into a number to work with? In particular, I want to add a 1 if

    the
    > cell contains "Monday", 2 if "Tuesday" etc.
    >
    > Any ideas?
    > Thanks!




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1