Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Given Calc where DATE(YYYY,MM,DD) and WEEKDAY(X) results 1 = Sunday, 2 =
Monday ... 6 = Friday, 7 = Saturday.
Solve for the first week of the month (WD = 1)

Variables
YYYY = 2017 desired year,
MM = 10 = desired month,
d1 = 1 = First day of the month
WC = 3 = Weekday code for Tuesday
WD = 1 = Week Desired = (1 First week, 2 Second week {maximum of week 4})
WO = WD*7-6 = Week Desired Offset

Solve for
DD = desired day

:. Find the weekday for the first day of the month
X =WEEKDAY(DATE(YYYY,MM,d1))

:. Find the Desired Day
DD =IF(WD-X+1>0,WD-X+WO,WD-X+WO+7)

Proof = WEEKDAY(DATE(YYYY,MM,DD)) = 3

On 29 September 2017 at 05:09, Alexander Thurgood <alex.thurgood@gmail.com>
wrote:

Le 28/09/2017 à 17:02, Michael D. Setzer II a écrit :

Hi Michael,


Well, hope you got the one sent to your direct email. This list doesn't
seem to
allow either attached spreadsheets or images.  Hopefully, others can
figure
out the formula, or if requested can send anyone a copy of the
spreadsheet
to an email that will accept it.



Yes, the list scrubs attachments on inbound mail.


Alex


--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-
unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be
deleted


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.