On 12 Jun 2015 at 8:49, Gordon Burgess-Parker wrote:
Date sent:Fri, 12 Jun 2015 08:49:35 +0100 From:Gordon [email protected] To:[email protected] Subject:Re: [libreoffice-users] Calc date formulae On 12/06/15 08:44, Dries Feys wrote: If the date to check is in B3, try the following formula: =IF(WEEKDAY(B3)=1;B3-2;IF(WEEKDAY(B3)=7;B3-1;B3)) Don't forget to format the target cell as a date ;-) Succes Great! Brilliant! Thanks very much! Another option to do it without if's. Column A has dates, formula in column b uses col a, but if date is a sat or sunday, it subtracts the value. Friday, June 12, 2015 Friday, June 12, 2015 '=A1-(MOD(INT(A1),7)2)*(MOD(INT(A1),7)+1) Saturday, June 13, 2015 Friday, June 12, 2015 Sunday, June 14, 2015 Friday, June 12, 2015 Monday, June 15, 2015 Monday, June 15, 2015 Tuesday, June 16, 2015 Tuesday, June 16, 2015 Wednesday, June 17, 2015 Wednesday, June 17, 2015 Thursday, June 18, 2015 Thursday, June 18, 2015 Friday, June 19, 2015 Friday, June 19, 2015 Saturday, June 20, 2015 Friday, June 19, 2015 Sunday, June 21, 2015 Friday, June 19, 2015 Monday, June 22, 2015 Monday, June 22, 2015 Tuesday, June 23, 2015 Tuesday, June 23, 2015 Wednesday, June 24, 2015 Wednesday, June 24, 2015 -- To unsubscribe e-mail to: [email protected] 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: [email protected] 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
