Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rhonda1
 
Posts: n/a
Default FORMULA NEEDED TO COUNT DAYS IN EXCEL BETWEEN DATES

I have two questions. I have three columns that will have a calendar date in
them. On the fourth column, I need to put in a formula that will count the
days of the previous three columns. I can't seem to find the function that
will do this for me.

Second question I need a formula that will calculate the hours it took to
complete the tasks. i.e. convert the number of days into hours.

Also, one more...is there a way that once data is placed into one
cell....the cell in the column on the right will automatically configure the
current date?

Thanks!
Rhonda
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Anne Troy
 
Posts: n/a
Default FORMULA NEEDED TO COUNT DAYS IN EXCEL BETWEEN DATES

1. So you want to add the days between the first and second column to the
number of days between the second and third column? Assuming the 2nd
column's dates fall after the first, and the 3rd after the 2nd, why not:
=(A2-B2)+(C2-B2)
2. Assuming the formula above is in D2, to get the hours:
=D2/24
3. Assuming you want to show a date in column B only if there is a value in
column C, try this:
=IF(ISBLANK(C2),"",TODAY())
However, the above formula will calculate and return "today" always.
************
Hope it helps!
Anne Troy
www.OfficeArticles.com

"Rhonda1" wrote in message
...
I have two questions. I have three columns that will have a calendar date
in
them. On the fourth column, I need to put in a formula that will count the
days of the previous three columns. I can't seem to find the function that
will do this for me.

Second question I need a formula that will calculate the hours it took to
complete the tasks. i.e. convert the number of days into hours.

Also, one more...is there a way that once data is placed into one
cell....the cell in the column on the right will automatically configure
the
current date?

Thanks!
Rhonda



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid
 
Posts: n/a
Default FORMULA NEEDED TO COUNT DAYS IN EXCEL BETWEEN DATES

Given two dates, you can find the number of days between them by simple
subtraction. However, it is best to enclose the difference in the
VALUE() functino, because otherwise Excel tends to format the result as
date:

=VALUE(B2-A2)

On your second question: You do not specify whether you record time. It
seems you only record dates. Then, the formula needed is probably:

=VALUE(B2-A2)*8

assuming that a working day has 8 hours.

For quick date/time entry you can use the combinatinos Ctrl+; (which
will enter the current date) and Shift+Ctrl+; (which will enter the
current time).

For further automation, let us assume that your data are to be entered
in column C:C and the data entry time in Column D:D. Then the following
event macro will automate this process:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C:C")) Is Nothing Then
Cells(Target.Cells(1,1).Row, Target.Cells(1,1).Column+1) = Format(Now,
"dd-mm-yyyy hh:mm")
End If
End Sub

Notice:
Change the construct "C:C" to whatever column is to hold data entry.
The row that starts with "Cells(" is to be a single line with hh:mm")
To install:
Right-click the sheet tab, select View Code, which will bring you to
VBA.
Paste the above code after possibly changing something.

HTH
Kostis Vezerides

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rhonda1
 
Posts: n/a
Default FORMULA NEEDED TO COUNT DAYS IN EXCEL BETWEEN DATES

Thank you to both! You have helped tremendously! Something so simple suddenly
bacame so complicated, and then suddenly so simple again! Thank you!

"Rhonda1" wrote:

I have two questions. I have three columns that will have a calendar date in
them. On the fourth column, I need to put in a formula that will count the
days of the previous three columns. I can't seem to find the function that
will do this for me.

Second question I need a formula that will calculate the hours it took to
complete the tasks. i.e. convert the number of days into hours.

Also, one more...is there a way that once data is placed into one
cell....the cell in the column on the right will automatically configure the
current date?

Thanks!
Rhonda

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Anne Troy
 
Posts: n/a
Default FORMULA NEEDED TO COUNT DAYS IN EXCEL BETWEEN DATES

You're welcome, Rhonda! :) So glad we could help.
************
Anne Troy
www.OfficeArticles.com

"Rhonda1" wrote in message
...
Thank you to both! You have helped tremendously! Something so simple
suddenly
bacame so complicated, and then suddenly so simple again! Thank you!

"Rhonda1" wrote:

I have two questions. I have three columns that will have a calendar
date in
them. On the fourth column, I need to put in a formula that will count
the
days of the previous three columns. I can't seem to find the function
that
will do this for me.

Second question I need a formula that will calculate the hours it took
to
complete the tasks. i.e. convert the number of days into hours.

Also, one more...is there a way that once data is placed into one
cell....the cell in the column on the right will automatically configure
the
current date?

Thanks!
Rhonda



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
Excel Count Formula? Mrebisz3154 Excel Worksheet Functions 2 January 18th 06 05:15 PM
Excel formula help needed SteveFox Excel Worksheet Functions 2 November 23rd 05 12:52 AM
formula needed to track dates event happened ilmeaz Excel Worksheet Functions 1 November 15th 05 02:52 AM
to find number of days between 2 dates using vba code in excel sjayar Excel Discussion (Misc queries) 3 November 3rd 05 06:24 AM
how would I count dates (not # of days) in cells that fall betwee. sailingscotts Excel Worksheet Functions 3 August 16th 05 04:29 AM


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