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=quot;Mondayquot;,1,quot;quot;) 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,quot;quot;) but the formula still doesn’t work.
Does anybody now how to do this?
TimTim
one way:
=IF(WEEKDAY(A1)=2,1,quot;quot;)
This would depend on the settings on your computer. This assumes that
Sunday is the first day of the week.
Regards
Trevorquot;Timquot; gt; wrote in message
...
gt; Hi All,
gt;
gt; What i am trying to do is to run different macro depending of the day of
gt; the
gt; week.
gt; For this purpose in cell A1 i typed the formula =now() and then right
gt; clicked on cell A1/Format Cells/Number/Category:Custom/and in the Type:
gt; typed: dddd .
gt; After that in cell A1 is the word Monday.
gt; In cell B1 i type this formula: =IF(A1=quot;Mondayquot;,1,quot;quot;) BUT it looks the
gt; formula in B1 doesn't recognize the word Monday in cell A1 because after i
gt; press Enter
gt; cell B1 remains empty not 1 as it should be. I also tried to copy cell A1
gt; and paste special as values in cell A2 and then changed the formula in B1
gt; to
gt; =IF(A2= 38789.66795,1,quot;quot;) but the formula still doesn't work.
gt; Does anybody now how to do this?
gt;
gt; Tim
gt;
Works great.
Thank you Trevor!!!Tim
- Aug 14 Mon 2006 20:09
run different macro depending of the day of the week
close
全站熱搜
留言列表
發表留言