Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Add 2 days before and after birthdate

I have column of birthdates and need to have a date range showing 2
days before and after the Month and day (in current year) of
birthdate.

For example

Birthdate:
01/31/1968

Result:
01/29/2009 - 02/02/2009

Is this possible?

Any and all help greatly appreciated
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Add 2 days before and after birthdate

In a single cell?

=text(a1-2,"mm/dd/yyyy") & " - " & text(a1+2,"mm/dd/yyyy")

Where A1 contains the date.



Sunflower wrote:

I have column of birthdates and need to have a date range showing 2
days before and after the Month and day (in current year) of
birthdate.

For example

Birthdate:
01/31/1968

Result:
01/29/2009 - 02/02/2009

Is this possible?

Any and all help greatly appreciated


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Add 2 days before and after birthdate

On Apr 8, 1:50*pm, Dave Peterson wrote:
In a single cell?

=text(a1-2,"mm/dd/yyyy") & " - " & text(a1+2,"mm/dd/yyyy")

Where A1 contains the date.





Sunflower wrote:

I have column of birthdates and need to have a date range showing 2
days before and after the Month and day (in current year) of
birthdate.


For example


Birthdate:
01/31/1968


Result:
01/29/2009 - 02/02/2009


Is this possible?


Any and all help greatly appreciated


--

Dave Peterson- Hide quoted text -

- Show quoted text -


I do want the result in a single cell and what you sent works...
However, when I put your formula in the B1 cell
I am getting it to show...
01/29/1968 - 02/02/1968

What I need is the year to be current ...
01/29/2009 - 02/02/2009

Any and all help greatly appreciated
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Add 2 days before and after birthdate

Sorry, I missed that:

=text(date(year(today()),month(a1),day(a1)-2),"mm/dd/yyyy") & " - " &
text(date(year(today()),month(a1),day(a1)+2),"mm/dd/yyyy")


Sunflower wrote:

On Apr 8, 1:50 pm, Dave Peterson wrote:
In a single cell?

=text(a1-2,"mm/dd/yyyy") & " - " & text(a1+2,"mm/dd/yyyy")

Where A1 contains the date.





Sunflower wrote:

I have column of birthdates and need to have a date range showing 2
days before and after the Month and day (in current year) of
birthdate.


For example


Birthdate:
01/31/1968


Result:
01/29/2009 - 02/02/2009


Is this possible?


Any and all help greatly appreciated


--

Dave Peterson- Hide quoted text -

- Show quoted text -


I do want the result in a single cell and what you sent works...
However, when I put your formula in the B1 cell
I am getting it to show...
01/29/1968 - 02/02/1968

What I need is the year to be current ...
01/29/2009 - 02/02/2009

Any and all help greatly appreciated


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Add 2 days before and after birthdate

On Apr 8, 3:50*pm, Dave Peterson wrote:
Sorry, I missed that:

=text(date(year(today()),month(a1),day(a1)-2),"mm/dd/yyyy") & " - " &
*text(date(year(today()),month(a1),day(a1)+2),"mm/dd/yyyy")





Sunflower wrote:

On Apr 8, 1:50 pm, Dave Peterson wrote:
In a single cell?


=text(a1-2,"mm/dd/yyyy") & " - " & text(a1+2,"mm/dd/yyyy")


Where A1 contains the date.


Sunflower wrote:


I have column of birthdates and need to have a date range showing 2
days before and after the Month and day (in current year) of
birthdate.


For example


Birthdate:
01/31/1968


Result:
01/29/2009 - 02/02/2009


Is this possible?


Any and all help greatly appreciated


--


Dave Peterson- Hide quoted text -


- Show quoted text -


I do want the result in a single cell and what you sent works...
However, when I put your formula in the B1 cell
I am getting it to show...
01/29/1968 - 02/02/1968


What I need is the year to be current ...
01/29/2009 - 02/02/2009


Any and all help greatly appreciated


--

Dave Peterson- Hide quoted text -

- Show quoted text -


BEAUTIFUL!!! Works like a charm!! Thank you so much
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
Age based on birthdate Squid Excel Worksheet Functions 2 January 24th 09 02:04 AM
Age from birthdate Nev Excel Worksheet Functions 9 November 19th 06 05:51 PM
Birthdate Months Alan Excel Discussion (Misc queries) 4 February 3rd 06 08:12 PM
Birthdate Formula mortola Excel Worksheet Functions 3 April 15th 05 05:21 PM
how to get age using birthdate tyniyvonne Excel Discussion (Misc queries) 3 December 6th 04 06:09 PM


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

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"