I need to detect and display the date of the first Wednesday of the current month in a cell.
What formula(s) do I need to create to do this?
Thanks in advance,
Francis X.
I need to detect and display the date of the first Wednesday of the current month in a cell.
What formula(s) do I need to create to do this?
Thanks in advance,
Francis X.
Last edited by FrancisXSlaughterry; 06-05-2011 at 09:01 AM.
Try this as a general function for first Wednesday in given month.
And for the current month![]()
=DATE(YEAR(A1),MONTH(A1),1)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),4))+7
Hope this helps.![]()
=DATE(YEAR(TODAY()),MONTH(TODAY()),1)-WEEKDAY(DATE(YEAR(TODAY()),MONTH(TODAY()),4))+7
[EDIT]
Accidentally left an unrelated macro in the workbook.
Took the oppertunity to add DLLs' solution to this attachment.
Last edited by Marcol; 06-05-2011 at 09:25 AM. Reason: Accidentally left an unrelated macro in the workbook
If you need any more information, please feel free to ask.
However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....
Also
اس کی مدد کرتا ہے اگر
شکریہ کہنے کے لئے سٹار کلک کریں
If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.
That works perfectly. Thank you! I also appreciate that you posted the file. Excellent stuff.
given that you can get first day of the month with A1-DAY(A1)+1 you could also shorten that formula to this version
=A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+4)
Audere est facere
Happy to help.
You might find this link and its' related links useful
Worksheet Functions For Dates And Times
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks