Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Count Formula? | Excel Worksheet Functions | |||
Excel formula help needed | Excel Worksheet Functions | |||
formula needed to track dates event happened | Excel Worksheet Functions | |||
to find number of days between 2 dates using vba code in excel | Excel Discussion (Misc queries) | |||
how would I count dates (not # of days) in cells that fall betwee. | Excel Worksheet Functions |