Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - if the date is greater than 25th, move the payment date to next month 1

Status
Not open for further replies.

pendle666

Technical User
Jan 30, 2003
295
GB
Hello

I'm working on maternity pay calculations. These are always worked out in weeks even if someone gets paid monthly.

In cell B13 is 21/02/2017 so G13 has the formula =month(B13) which results in a "2" in that cell for February.

But in cell B14 is 28/02/2017 which is after the payday of 25th, so that week's payment is made the next month. So what I want G14 to say is IF B14 is less than or equal to 25th, then =month(B14), otherwise choose the next calendar month. So the result needs to be a "3" for March.

But I can't just do plus 30 days because I don't think it'll work throughout the entire sheet and the dates in column B can vary, but will always increment 7 days.

Can anyone help please?

thank you





thank you for helping

____________
Pendle
 
Hi,
[tt]
=MONTH(IF(DAY(B13)>25,B13+7,B13))
[/tt]

COPY/PASTE down.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top