#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Formula

I have a speadsheet that I enter the Date of Hire of an employee. I would
like to have a formula that will calculate in a cell when someone would be
with the company for 4 months.

for example

A1 B1
04/01/07 08/01/07
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Formula

On Jun 25, 5:04 pm, Phxlatinoboi®
wrote:
I have a speadsheet that I enter the Date of Hire of an employee. I would
like to have a formula that will calculate in a cell when someone would be
with the company for 4 months.

for example

A1 B1
04/01/07 08/01/07


Ostensibly:

=date(year(A1), 4+month(A1), day(A1))

But I wonder if you would be happier with:

=date(year(A1), 4+month(A1),
day(if(day(A1)day(eomonth(A1,4)), eomonth(A1,4), A1)))

Try both with 10/30/2006 in A1 and decide which you prefer.

Note: If you get a #NAME error, look at the Help page for EOMONTH.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Formula

=DATE(YEAR(A1),MONTH(A1)+4,DAY(A1))
--
David Biddulph

"Phxlatinoboi®" wrote in message
...
I have a speadsheet that I enter the Date of Hire of an employee. I would
like to have a formula that will calculate in a cell when someone would be
with the company for 4 months.

for example

A1 B1
04/01/07 08/01/07



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Formula

improvement....

On Jun 25, 5:27 pm, I wrote:
But I wonder if you would be happier with:
=date(year(A1), 4+month(A1),
day(if(day(A1)day(eomonth(A1,4)), eomonth(A1,4), A1)))


Arguably better (but equivalent):

=if(day(A1)day(eomonth(A1,4)), eomonth(A1,4),
date(year(A1), 4+month(A1), day(A1)))

Be sure to format B1 as Date.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Formula

The formula below required Analysis ToolPak Add-Ins

=EDATE(A1,4)

Format cell as date


"Phxlatinoboi®" wrote:

I have a speadsheet that I enter the Date of Hire of an employee. I would
like to have a formula that will calculate in a cell when someone would be
with the company for 4 months.

for example

A1 B1
04/01/07 08/01/07

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"