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


2018-01-28 15:45 GMT+01:00 Luuk <luuk34@gmail.com>:

You can write a FUNCTION to get next month

Function FirstOfNextMonth(dDate as Date) as Date
    if Month(dDate)>=12 then
        FirstOfNextMonth = DateSerial(Year(dDate)+1, 1, 1)
    else
        FirstOfNextMonth = DateSerial(Year(dDate), Month(dDate)+1, 1)
    end if
End Function


When you use = FirstOfNextMonth(Now()) is will return 01-02-2018  (if
your date-format = DD-MM-YYYY)


Just note that your function always returns the first day of the calculated
month. I'm not sure the OP wants that, but maybe I'm wrong.



Kind regards

Johnny Rosenberg





On 27-01-18 22:26, bjlockie wrote:
I keep a spreadsheet with a monthly budget.
Each month I copy a month to make a new month.
I use Fill  to change the dates to the new month.
This is not ideal because sometimes there are 2 rows for the same day and
Fill changes the 2nd day.
I need a macro just to change the month and not the day.

Eg.
Jan 1 2018 | debit | ...
Jan 1 2018 | credit card | ...
Jan 2 2018 | credit card | ...

Using Fill to get a new section for Feb results in:
Feb 1 2018 | debit | ...
Feb 2 2018 | credit card | ...
Feb 3 2018 | credit card | ...

What I want is:
Feb 1 2018 | debit | ...
Feb 1 2018 | credit card | ...
Feb 2 2018 | credit card | ...




--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html



--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-
unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://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? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://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.