Help with Formula for Calculating days to Payday

Discuss the spreadsheet application
Post Reply
openofficeEm
Posts: 1
Joined: Fri Oct 12, 2018 10:11 pm

Help with Formula for Calculating days to Payday

Post by openofficeEm »

Hi all,

I am working on a budget sheet and I'm trying to work out a formula that will show me the days left until payday from today.

I worked out how to work out the number of days from today until the end of the month, but then I realised that I need to work out the number of days between today and a specific date, but I get paid every 4 weeks so it constantly changes. e.g. This month I will be paid on 19th October, but next month I will be paid on 16th November, and then 14th December and so on. Does anyone know an appropriate formula to use in this scenario?

I am currently using
Date: Days until the end of the month
=Today() ==EOMONTH(A3;0)-A3
OpenOffice 3.1 on Windows 10
FJCC
Moderator
Posts: 9270
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Help with Formula for Calculating days to Payday

Post by FJCC »

This should give you the number days until the next payday.

Code: Select all

=28 - MOD(TODAY() - DATE(2018;9;21);28)
The idea is that
TODAY() - DATE(2018;9;21)
gives you the number of days since Sept 21, 2018, which was a payday.
The MOD function is set to tell you the remainder of dividing that number by 28. For example, five days after a payday it returns 5.
Subtracting that number from 28 tells you how many days until the current 28 day cycle ends.

On a payday the formula returns 28.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Post Reply