+ Reply to Thread
Results 1 to 3 of 3

run different macro depending of the day of the week

  1. #1
    Tim
    Guest

    run different macro depending of the day of the week

    Hi All,

    What i am trying to do is to run different macro depending of the day of the
    week.
    For this purpose in cell A1 i typed the formula =now() and then right
    clicked on cell A1/Format Cells/Number/Category:Custom/and in the Type:
    typed: dddd .
    After that in cell A1 is the word Monday.
    In cell B1 i type this formula: =IF(A1="Monday",1,"") BUT it looks the
    formula in B1 doesn’t recognize the word Monday in cell A1 because after i
    press Enter
    cell B1 remains empty not 1 as it should be. I also tried to copy cell A1
    and paste special as values in cell A2 and then changed the formula in B1 to
    =IF(A2= 38789.66795,1,"") but the formula still doesn’t work.
    Does anybody now how to do this?

    Tim


  2. #2
    Trevor Shuttleworth
    Guest

    Re: run different macro depending of the day of the week

    Tim

    one way:

    =IF(WEEKDAY(A1)=2,1,"")

    This would depend on the settings on your computer. This assumes that
    Sunday is the first day of the week.

    Regards

    Trevor


    "Tim" <[email protected]> wrote in message
    news:[email protected]...
    > Hi All,
    >
    > What i am trying to do is to run different macro depending of the day of
    > the
    > week.
    > For this purpose in cell A1 i typed the formula =now() and then right
    > clicked on cell A1/Format Cells/Number/Category:Custom/and in the Type:
    > typed: dddd .
    > After that in cell A1 is the word Monday.
    > In cell B1 i type this formula: =IF(A1="Monday",1,"") BUT it looks the
    > formula in B1 doesn't recognize the word Monday in cell A1 because after i
    > press Enter
    > cell B1 remains empty not 1 as it should be. I also tried to copy cell A1
    > and paste special as values in cell A2 and then changed the formula in B1
    > to
    > =IF(A2= 38789.66795,1,"") but the formula still doesn't work.
    > Does anybody now how to do this?
    >
    > Tim
    >




  3. #3
    Tim
    Guest

    Re: run different macro depending of the day of the week



    Works great.
    Thank you Trevor!!!


    Tim


+ 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