=Not clear on formula.It seems to be more complex then mine, but does also work a little differently. Yours does seem to give the 4th week instead of the 5th week, if it falls in the next month.
=IF(MONTH(DATE(Input.$A$2,1,1)-7+(Input.$C$2*7)-(WEEKDAY(DATE(Input.$A$2,1,1)))+Input.$B$2)1,DATE(Input.$A$2,1,1)-7+(Input.$C$2*7)-(WEEKDAY(DATE(Input.$A$2,1,1)))+Input.$B$2-7,DATE(Input.$A$2,1,1)+(Input.$C$2*7)-(WEEKDAY(DATE(Input.$A$2,1,1)))-7+Input.$B$2) =DATE(Input.$A$2,$A2,1)+Input.$B$2-WEEKDAY(DATE(Input.$A$2,$A2,1))+((Input.$B$2WEEKDAY(DATE(Input.$A$2,$A2,1)))+(input.$C$2-1))*7 My two worksheets. ftp://setzco.dyndns.org/libreoffice/nthweekday.ods</div>ftp://setzco.dyndns.org/libreoffice/simplenth.ods On 18 Oct 2017 at 1:24, Jan Flikweert wrote: Date sent:60;Wed, 18 Oct 2017 01:24:06 -0700 (MST) From:60;Jan flikweertjanflikwe...@tele2.nl To:;users@global.libreoffice.org Subject:;[libreoffice-users] Re: Calculating the Nth weekday of a month. Now in Calc with a less complicated formula: https://drive.google.com/open?id=0B8X24IrD0EquMjYyUnRNWEZkb28 and the macro in calc: https://drive.google.com/open?id=0B8X24IrD0EquTnY4UWR3Q2F4bWM Kind regards, Jan Flikweert -- Sent from: http://nabble.documentfoundation.org/Users-f1639498.html -- To unsubscribe e-mail to: users+unsubscr...@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+unsubscr...@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