Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tim
 
Posts: n/a
Default 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 doesnt 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 doesnt work.
Does anybody now how to do this?

Tim

  #2   Report Post  
Posted to microsoft.public.excel.misc
Trevor Shuttleworth
 
Posts: n/a
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.misc
Tim
 
Posts: n/a
Default run different macro depending of the day of the week



Works great.
Thank you Trevor!!!


Tim

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Macro to coppy cells to certain rows depending on value in cell Esrei Excel Discussion (Misc queries) 0 December 9th 05 07:57 AM
Editing a simple macro Connie Martin Excel Worksheet Functions 5 November 29th 05 09:19 PM
4 and 5 week months Big Rick Excel Discussion (Misc queries) 15 November 7th 05 12:32 AM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 02:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"