Take me to next pay period end date? - excel

I'm trying to create a formula that will take me to the next pay period end date.
For example, if the employee's leave of absence is going to go unpaid effective 1-1-15, I want a formula that will tell me when the last day of the pay period is for 1-1-15. We have biweekly pay periods.

Step 1: define your pay periods.
In your case, it seems pay periods are simply every other week, always on the same day of the week. You may get away with simply writing a formula that checks to see if the target date rounds into a number divisible by 14; however in the case of a holiday (which may push the payment into the prior day or the following Monday depending on holdiay), I recommend creating a list manually.
To do this, go to a new sheet (let's say Sheet2). On A1, write the date of the last pay period which just happened. Then on A2 and drag down, use the formula:
=A1+14
However, after dragging this down to the end of the year, I recommend that you go back and manually confirm that each date is appropriate (ie: are there any special cases?
Step 2
Use a lookup formula to check which pay period a date falls into. Here I'll assume a simple case, where Sheet1 A1 contains the date that an employee begins unpaid leave, and Sheet1 B1 will contain the pay period which that date falls into:
=VLOOKUP(A1,'Sheet2'!A:A,1,1)
This will look for the value in A1 on Sheet2 - if it falls on the exact day, it will spit it back to you. If it doesn't fall on the exact day, it will give you the next closest date after that [make sure this rounds the way you want; I couldn't quite get a sense of the actual response you wanted].

Related

Match column then step back to grab data

I am calculating Earned Value (EV) and Planned Value (PV) by pulling the estimated and scheduled completed work. The formula below works as it should with one minor hiccup, it pulls the data for this on going pay period based on my =Today() cell, making it look like my Scheduled Variance is behind as there are no hours entered yet.
My thought process is as follows.
Reference the cell with =Today() Use that to look at the start and end dates for the pay period. Then move back to the previous period once it finds a match.
=LOOKUP($B$1,1/('Labor-AC_EST'!$E$43:$AE$43<=$B$1)/('Labor-AC_EST'!$E$44:$AE$44>=$B$1),'Labor-AC_EST'!E45:AE45)

Dynamic week number in respect to year

I'm trying to to retrieve monthly the week number of the year, sounds like a stupid question, but this is what I want to look like:
For the cell C1 I have created a drop down list based on B1 => =TEXT(TODAY();"[$-0809]mmmm") and also the Weeks (C2:C6) are retrieved by HLookup Function.
The idea is that I only need a dynamic Week format, such as C1:C6, but I didn't find another way outside the one I've used and I also need to transpose it in VBA. Is there an easier method? I could use your hints/ideas.
On a new sheet which is exported monthly I need to show the 4/5 weeks of each month, being different from month to month.
Use the Weeknum function: =WEEKNUM(DATE(2019,3,1),2) will return the first week of the month and =WEEKNUM(EOMONTH(DATE(2019,3,1),0),2) will return the last week of the month.
So put …
in B2 =WEEKNUM(DATE(YEAR(TODAY()),$B$1,1),2 )
in B3 =IFERROR(IF(B2+1<=WEEKNUM(EOMONTH(DATE(YEAR(TODAY()),$B$1,1),0),2 ),B2+1,""),"") and pull it down to get the following result:
If you now change the month number in B1 it calculates the rest automatically:
Note that there are different official week numbering systems, while the most common would be the ISO week date. That means that january 1st is not always week number 1!

N-Count Days For Changing Dates For Ecommerce Shipment Sheet

I have to submit a daily MIS for orders which are Undelivered For less then 2 Days, Undelivered Between 3-5 Days and 5+ Days.
Currently i'm doing this manually by counting from the Purchase Date forward. So e.g. for an order of 11th March, i'll just count 2 days till 13th (If undelivered) and type 1 in front of the column and do a count manually of all orders outstanding in each column.
The problem arises as the column descends and the dates get further and further away from current day.
This is tiresome but i can't seem to find an algorithm that can do this automatically.
Can anyone help please.
Consider this screenshot:
Cell A1 has the date you want to compare to. Don't user the Today() function, since it is volatile and can slow down the workbook. Just manually put in the desired date.
The formula in cell E2 is
=IF(D2="undelivered",IF($A$1-C2<=2,"less than 2",IF($A$1-C2<=5,"3 - 5 days","5+ days")),"")
In words: if the status is "undelivered", calculate the difference between purchase date and A1. If it is less than 2, return that text, if it is less than 5, return that text, otherwise return the third text.
Copy that formula down.
In cells G3 to G5 you see each of the three texts and next to it is a formula. Starting in H3
=COUNTIF(E:E,G3)
copied down to H5.
Your layout may differ, so you will need to adjust the formulas accordingly.

Retrieve cell value based on date Excel

I'm working on a time sheet for my work schedule. In column A I have the start dates of each week. In the second column I have how many hours I work that day. I am payed on the 22nd of each month. I want to have a running total of how much I have earned in a month before payday. That is to say on the 21st I know how much money I will be paid the next day from my spreadsheet.
I want to SUM the values of column B but only for the weeks which lie between the 22nd of 'April' lets say and 'May'.
Therefore based on the value of the start date of the week, I need to obtain the information adjacent to the weeks, for a set of weeks and sum it to find the number of hours I've worked this paying month. I want this to happen automatically, so it will change automatically.
I have attached a screenshot which might make this clearer, I have added a couple of other names as additional variables.
Thank you in advance,
Maksim Richards
If the amounts that you'll get in next month's pay haven't been filled in yet (which is the question you're asking because you want to find out on 21st May how much you will be getting) then you just need to sum the amounts for the weeks starting 22/4/16 onwards in G9:-
=SUMIF($A$4:$A$11,">="&DATE(YEAR($F$2),MONTH($F$2)-1,$G$2),B$4:B$11)
where today's date is in F2 and payday in G2.
Then the pay so far is:-
=G9*24*$H$2
where the hourly rate is in H2 (result may appear formatted as date: if so, change format to general).
If you wanted to check back after some of next month's hours had been put in the spreadsheet and see if what you've actually been paid is the same as your calculated pay you would need a SUMIFS:-
=SUMIFS(B$4:B$11,$A$4:$A$11,">="&DATE(YEAR($F$2),MONTH($F$2)-1,$G$2),$A$4:$A$11,"<"&DATE(YEAR($F$2),MONTH($F$2),$G$2))
I haven't used TODAY to get today's date because it's volatile and if you use it, it will keep prompting you to save the spreadsheet when you close it even if you haven't changed anything.

Display the upcoming due date

I am working with Microsoft Excel for Mac 2011 doing some personal finance and trying to devise a formula to display a specific date.
I have a credit card bill that is due on the 24th of every month. I have the name in Column A, and the Date it is due in Column B. Say that the current month is October, and the bill will be due on the 24th, I want it to display 10/24/15 (mm/dd/yy). I do not want to show any previous dates or current date, I only want to display the upcoming due date, and I want it to remain set on 10/24/15 until 10/25/15 where it will show me the next due date as 11/24/15, the very next month.
I need it to show the due date from 09/25/15 until 10/24/15. Then on 10/25/15 I need it to display the next due date.
UNTESTED. Please try:
=IF(DAY(TODAY())<25,DATE(YEAR(TODAY()),MONTH(TODAY()),24),DATE(YEAR(TODAY()),MONTH(TODAY()+1),24))
This solution assumes the following:
The Microsoft Excel for Mac 2011 includes the Excel function EOMONTH
The Accounts Payable Table is located at B1:D6 (adjust as required) with the following fields (see Fig. 1):
Account : Name of the payable account
Due Day : Day of the month when payment is due
Due Date : Next Payment date
Enter any of these two formulas in C2 and copy till last record
Formula 1:
=IF(DAY(TODAY())>$C3,
EOMONTH(TODAY(),0)+$C3,
EOMONTH(TODAY(),-1)+$C3)
Formula 2:
=EOMONTH(TODAY(),
IF(DAY(TODAY())>$C3,0,-1))
+$C3
I think I understand. For my example, my data is set up like this:
A B
1 Name Due Date
2 Visa 10/24/2015
For Cell B2, I have this formula:
=IF(DAY(TODAY())>=25,DATE(YEAR(TODAY()),MONTH(TODAY())+1,24),DATE(YEAR(TODAY()),MONTH(TODAY()),24))
I am assuming that you'll be opening the spreadsheet and want the month to update to the one we're currently in (hence using Today()).
Edit: To break it down -
Using =today() will return today's date in default format (pretty sure it's whatever your default format is, i.e. mm/dd/yyyy). So, using =Month(today()) will just return the month of today's date...just as Year(today()), day(today()) will return "today's year" and day, if that makes sense.
The If statement looks to see if today's numerical date is greater than or equal to 25. If it is, then return the date with today's year, today's month plus one, and the 24th. If today is less than the 25th, then return today's year, today's month, and 24 for the day.
Hopefully that helps!
edit2 - A more robust formula, allowing you to keep a separate table with the date in each month that your bills are due. Essentially, you're just replacing the "magic number" 24 with a Vlookup formula, VLOOKUP(B3,$F$2:$G$4,2,FALSE).
Here's how it works:
Instead of 'hard coding' the 24 in the formula, which you have to change every time your card changes (or you have a different due date each month), you can create a table to have these values. My range F2:G4 shows you which card is due which date. (I.e. the VISA is due on the 24th, so after the 24th, show next month). This way, you drag that formula down your "B" column, and it updates itself automatically. (See how AmEx I say is due on the 10th. But today is the 19th, so thus, we get November 10th as the due date.)
So for copying purposes, the new formula is =IF(DAY(TODAY())>VLOOKUP(B3,$F$2:$G$4,2,FALSE),DATE(YEAR(TODAY()),MONTH(TODAY())+1,VLOOKUP(B3,$F$2:$G$4,2,FALSE)),DATE(YEAR(TODAY()),MONTH(TODAY()),VLOOKUP(B3,$F$2:$G$4,2,FALSE))). (Of course, you'll need to change the ranges as necessary for your sheet).

Resources