ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Calculate date 28 days from now if hours reduce (https://www.excelbanter.com/excel-worksheet-functions/116575-calculate-date-28-days-now-if-hours-reduce.html)

watty

Calculate date 28 days from now if hours reduce
 
In a spreadsheet to calculate changes in an employee's hours, cell A5
holds the old hours worked, B5 holds the new hours, and C5 calculates
the difference between A5 and B5. A7 holds the date that the change is
effective.

B7 shows the date on which the variation to the contract is effective.
This is where I need assistance.

If the hours have increased, then B7 should have the same value as A7
(because with an increase in hours the change is effective
immediately).

If however the hours have reduced, then B7 needs to show an "effective
from" date 28 days after the date in A7 (because with a reduction, a
member of staff needs to be given 28 days notice).

A7 and B7 are both formatted to display dates using the the format
DD/MM/YY.

Can anyone suggest a way of doing this?

Thanks


Bob Phillips

Calculate date 28 days from now if hours reduce
 
In B7

=A7+(B5<A5)*28

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"watty" wrote in message
ups.com...
In a spreadsheet to calculate changes in an employee's hours, cell A5
holds the old hours worked, B5 holds the new hours, and C5 calculates
the difference between A5 and B5. A7 holds the date that the change is
effective.

B7 shows the date on which the variation to the contract is effective.
This is where I need assistance.

If the hours have increased, then B7 should have the same value as A7
(because with an increase in hours the change is effective
immediately).

If however the hours have reduced, then B7 needs to show an "effective
from" date 28 days after the date in A7 (because with a reduction, a
member of staff needs to be given 28 days notice).

A7 and B7 are both formatted to display dates using the the format
DD/MM/YY.

Can anyone suggest a way of doing this?

Thanks




watty

Calculate date 28 days from now if hours reduce
 
Many thanks - that works fine!


Bob Phillips wrote:
In B7

=A7+(B5<A5)*28

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"watty" wrote in message
ups.com...
In a spreadsheet to calculate changes in an employee's hours, cell A5
holds the old hours worked, B5 holds the new hours, and C5 calculates
the difference between A5 and B5. A7 holds the date that the change is
effective.

B7 shows the date on which the variation to the contract is effective.
This is where I need assistance.

If the hours have increased, then B7 should have the same value as A7
(because with an increase in hours the change is effective
immediately).

If however the hours have reduced, then B7 needs to show an "effective
from" date 28 days after the date in A7 (because with a reduction, a
member of staff needs to be given 28 days notice).

A7 and B7 are both formatted to display dates using the the format
DD/MM/YY.

Can anyone suggest a way of doing this?

Thanks




All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com