Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default IF and DATE Formula Help PLEASE

I am trying to calculate review dates for over 500 people. I want to create
a sheet that calculates reviews in 6 months for new hires and every 2 years
for existing staff. My example data is below and I'm to do the following
calculations in Column C:

Hire Date (A) Review Date (B) Next Review Due (C)
1/1/03 1/1/05 Formula here would = 1/1/07
(using
=DATE(YEAR(B2)+2,MONTH(B2),DAY(B2))
1/1/07 Formula here would = 7/1/07

(using=DATE(YEAR(A3),MONTH(A3)+6,DAY(A3))
2/5/04 2/5/06 Formula here would = 2/5/08
3/8/07 Formula here would = 9/8/07

I am trying to create an iF statement that says IF Column B has a date then
do the calculation =DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)), but IF Column B is
blank do the calculation =DATE(YEAR(A2),MONTH(A2)+6,DAY(A2))

I can not get it to work. Is it possible and if so, what is the write
formula??


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default IF and DATE Formula Help PLEASE

Hi Diane,

Try:
=IF(ISBLANK(B2),DATE(YEAR(A2),MONTH(A2)+6,DAY(A2)) ,DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)))

Control input to colums A&B with Data Validation, using a date range. That
should stop confusing data being places there.

--
---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)

"Diane1477" wrote in message
...
I am trying to calculate review dates for over 500 people. I want to
create
a sheet that calculates reviews in 6 months for new hires and every 2
years
for existing staff. My example data is below and I'm to do the following
calculations in Column C:

Hire Date (A) Review Date (B) Next Review Due (C)
1/1/03 1/1/05 Formula here would = 1/1/07
(using
=DATE(YEAR(B2)+2,MONTH(B2),DAY(B2))
1/1/07 Formula here would = 7/1/07

(using=DATE(YEAR(A3),MONTH(A3)+6,DAY(A3))
2/5/04 2/5/06 Formula here would = 2/5/08
3/8/07 Formula here would = 9/8/07

I am trying to create an iF statement that says IF Column B has a date
then
do the calculation =DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)), but IF Column B is
blank do the calculation =DATE(YEAR(A2),MONTH(A2)+6,DAY(A2))

I can not get it to work. Is it possible and if so, what is the write
formula??




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default IF and DATE Formula Help PLEASE

Should work:

=IF(B2<"",DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)),DATE (YEAR(A2),MONTH(A2)+6,DAY(A2)))
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF and DATE Formula Help PLEASE

Try it this way round:

=IF(ISBLANK(B2),DATE(YEAR(A2),MONTH(A2)+6,DAY(A2)) ,DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)))

Hope this helps.

Pete

On Oct 3, 4:01 pm, Diane1477
wrote:
I am trying to calculate review dates for over 500 people. I want to create
a sheet that calculates reviews in 6 months for new hires and every 2 years
for existing staff. My example data is below and I'm to do the following
calculations in Column C:

Hire Date (A) Review Date (B) Next Review Due (C)
1/1/03 1/1/05 Formula here would = 1/1/07
(using
=DATE(YEAR(B2)+2,MONTH(B2),DAY(B2))
1/1/07 Formula here would = 7/1/07

(using=DATE(YEAR(A3),MONTH(A3)+6,DAY(A3))
2/5/04 2/5/06 Formula here would = 2/5/08
3/8/07 Formula here would = 9/8/07

I am trying to create an iF statement that says IF Column B has a date then
do the calculation =DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)), but IF Column B is
blank do the calculation =DATE(YEAR(A2),MONTH(A2)+6,DAY(A2))

I can not get it to work. Is it possible and if so, what is the write
formula??



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default IF and DATE Formula Help PLEASE

I always forget ISBLANK exists :p


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default IF and DATE Formula Help PLEASE

THANK YOU VERY MUCH. IT WORKED PERFECTLY!

"Pete_UK" wrote:

Try it this way round:

=IF(ISBLANK(B2),DATE(YEAR(A2),MONTH(A2)+6,DAY(A2)) ,DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)))

Hope this helps.

Pete

On Oct 3, 4:01 pm, Diane1477
wrote:
I am trying to calculate review dates for over 500 people. I want to create
a sheet that calculates reviews in 6 months for new hires and every 2 years
for existing staff. My example data is below and I'm to do the following
calculations in Column C:

Hire Date (A) Review Date (B) Next Review Due (C)
1/1/03 1/1/05 Formula here would = 1/1/07
(using
=DATE(YEAR(B2)+2,MONTH(B2),DAY(B2))
1/1/07 Formula here would = 7/1/07

(using=DATE(YEAR(A3),MONTH(A3)+6,DAY(A3))
2/5/04 2/5/06 Formula here would = 2/5/08
3/8/07 Formula here would = 9/8/07

I am trying to create an iF statement that says IF Column B has a date then
do the calculation =DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)), but IF Column B is
blank do the calculation =DATE(YEAR(A2),MONTH(A2)+6,DAY(A2))

I can not get it to work. Is it possible and if so, what is the write
formula??




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF and DATE Formula Help PLEASE

Glad to hear it, Diane - thanks for feeding back.

Pete

On Oct 3, 5:18 pm, Diane1477
wrote:
THANK YOU VERY MUCH. IT WORKED PERFECTLY!



"Pete_UK" wrote:
Try it this way round:


=IF(ISBLANK(B2),DATE(YEAR(A2),MONTH(A2)+6,DAY(A2)) ,DATE(YEAR(B2)+2,MONTH(B2*),DAY(B2)))


Hope this helps.


Pete


On Oct 3, 4:01 pm, Diane1477
wrote:
I am trying to calculate review dates for over 500 people. I want to create
a sheet that calculates reviews in 6 months for new hires and every 2 years
for existing staff. My example data is below and I'm to do the following
calculations in Column C:


Hire Date (A) Review Date (B) Next Review Due (C)
1/1/03 1/1/05 Formula here would = 1/1/07
(using
=DATE(YEAR(B2)+2,MONTH(B2),DAY(B2))
1/1/07 Formula here would = 7/1/07


(using=DATE(YEAR(A3),MONTH(A3)+6,DAY(A3))
2/5/04 2/5/06 Formula here would = 2/5/08
3/8/07 Formula here would = 9/8/07


I am trying to create an iF statement that says IF Column B has a date then
do the calculation =DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)), but IF Column B is
blank do the calculation =DATE(YEAR(A2),MONTH(A2)+6,DAY(A2))


I can not get it to work. Is it possible and if so, what is the write
formula??- Hide quoted text -


- Show quoted text -



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a formula in a date range to locate a specific date - ecel util Excel Discussion (Misc queries) 0 February 19th 07 03:03 PM
Excel Formula to calulate number of days passed from date to date K. Mack Excel Discussion (Misc queries) 8 January 4th 07 11:27 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Discussion (Misc queries) 1 April 20th 06 10:03 PM
formula to calculate future date from date in cell plus days Chicesq Excel Worksheet Functions 8 November 3rd 05 12:25 PM


All times are GMT +1. The time now is 04:39 PM.

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

About Us

"It's about Microsoft Excel"