Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Help with dates

I'm using Excel 2003. I'm ok with basic formulas but don't do anything with
macros. I need help with dates. Assume that cell A1 contains a month - 04,
cell A2 contains a year - 2007, cell A3 contains a date - 04/09/1973, and
cell A4 contains a date - 08/09/2007. How can I create a date using the
month from cell A1, the day from cell A3, and the year from cell A2 so that
the date is displayed as 04/09/2007. I need to be able to calculated the
number of days between this date and the date in cell A4.

Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Help with dates

On Apr 11, 9:04 am, Genny Santos
wrote:
I'm using Excel 2003. I'm ok with basic formulas but don't do anything with
macros. I need help with dates. Assume that cell A1 contains a month - 04,
cell A2 contains a year - 2007, cell A3 contains a date - 04/09/1973, and
cell A4 contains a date - 08/09/2007. How can I create a date using the
month from cell A1, the day from cell A3, and the year from cell A2 so that
the date is displayed as 04/09/2007. I need to be able to calculated the
number of days between this date and the date in cell A4.

Thanks,


Inside of Excel go to Insert/Function and change the "Or select a
category:" option to "Date & Time." Excel already has the functions
you need for this. You can also use the CONCATENATE funtion to
"smash" things together. (The "&" will do the same thing CONCATENATE
does).

Here is an example: =A1&"/"&DAY(A3)&"/"&A2

Matt

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help with dates

In a cell put in the formula
=Date(A2,A1,day(A3))
format the cell mm/dd/yyyy

to get the difference

=Date(A2,A1,day(A3))-A4

format the cell to show the difference as General

--
Regards,
Tom Ogilvy


"Genny Santos" wrote:

I'm using Excel 2003. I'm ok with basic formulas but don't do anything with
macros. I need help with dates. Assume that cell A1 contains a month - 04,
cell A2 contains a year - 2007, cell A3 contains a date - 04/09/1973, and
cell A4 contains a date - 08/09/2007. How can I create a date using the
month from cell A1, the day from cell A3, and the year from cell A2 so that
the date is displayed as 04/09/2007. I need to be able to calculated the
number of days between this date and the date in cell A4.

Thanks,

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Help with dates

To get the date...

=DATE(A2,A1,DAY(A3))

To get the difference

=A4-DATE(A2,A1,DAY(A3))
--
HTH...

Jim Thomlinson


"Genny Santos" wrote:

I'm using Excel 2003. I'm ok with basic formulas but don't do anything with
macros. I need help with dates. Assume that cell A1 contains a month - 04,
cell A2 contains a year - 2007, cell A3 contains a date - 04/09/1973, and
cell A4 contains a date - 08/09/2007. How can I create a date using the
month from cell A1, the day from cell A3, and the year from cell A2 so that
the date is displayed as 04/09/2007. I need to be able to calculated the
number of days between this date and the date in cell A4.

Thanks,

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Help with dates

On Apr 11, 9:13 am, "matt" wrote:
On Apr 11, 9:04 am, Genny Santos

wrote:
I'm using Excel 2003. I'm ok with basic formulas but don't do anything with
macros. I need help with dates. Assume that cell A1 contains a month - 04,
cell A2 contains a year - 2007, cell A3 contains a date - 04/09/1973, and
cell A4 contains a date - 08/09/2007. How can I create a date using the
month from cell A1, the day from cell A3, and the year from cell A2 so that
the date is displayed as 04/09/2007. I need to be able to calculated the
number of days between this date and the date in cell A4.


Thanks,


Inside of Excel go to Insert/Function and change the "Or select a
category:" option to "Date & Time." Excel already has the functions
you need for this. You can also use the CONCATENATE funtion to
"smash" things together. (The "&" will do the same thing CONCATENATE
does).

Here is an example: =A1&"/"&DAY(A3)&"/"&A2

Matt


One more note, dates are serial numbers (e.g. 8/9/2007 is 39,303), so
the dates can be subtracted from each other to arrive at the total
number of days.

Matt



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help with dates

Reverse the formula for the difference - I see the A4 date is later.

--
Regards,
Tom Ogilvy


"Genny Santos" wrote:

I'm using Excel 2003. I'm ok with basic formulas but don't do anything with
macros. I need help with dates. Assume that cell A1 contains a month - 04,
cell A2 contains a year - 2007, cell A3 contains a date - 04/09/1973, and
cell A4 contains a date - 08/09/2007. How can I create a date using the
month from cell A1, the day from cell A3, and the year from cell A2 so that
the date is displayed as 04/09/2007. I need to be able to calculated the
number of days between this date and the date in cell A4.

Thanks,

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
Linking computer dates (time) to spreadsheet dates that have formu bigisle Excel Worksheet Functions 3 January 3rd 10 08:05 PM
Toggle a range of Julian dates to Gregorian Dates and Back PSKelligan Excel Programming 4 May 8th 07 05:51 AM
Identifying unique dates in a range of cells containing dates... cdavidson Excel Discussion (Misc queries) 4 October 13th 06 03:30 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM


All times are GMT +1. The time now is 07:31 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"