ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Execute macro for weekday (https://www.excelbanter.com/excel-programming/371299-execute-macro-weekday.html)

[email protected]

Execute macro for weekday
 
Have been trying to execute macros on certain weekday have got it to
work to display me a message box based on an earlier thread but I would
like to add to cell c2 if its a monday and add some values to cell c5
if its a friday. is there a way to do that? thanks


Bob Phillips

Execute macro for weekday
 
Just add some code in the macro

If Weekday(Date) = 2 Then
'add C2
ElseIf Weeklday(Date) = 6 Then
'add C5
End If

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ps.com...
Have been trying to execute macros on certain weekday have got it to
work to display me a message box based on an earlier thread but I would
like to add to cell c2 if its a monday and add some values to cell c5
if its a friday. is there a way to do that? thanks





All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com