close

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 questiongt; 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

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),quot;quot;,TODAY())
However, the above formula will calculate and return quot;todayquot; always.
************
Hope it helps!
Anne Troy
www.OfficeArticles.com

quot;Rhonda1quot; gt; wrote in message
...
gt;I have two questions. I have three columns that will have a calendar date
gt;in
gt; them. On the fourth column, I need to put in a formula that will count the
gt; days of the previous three columns. I can't seem to find the function that
gt; will do this for me.
gt;
gt; Second questiongt; I need a formula that will calculate the hours it took to
gt; complete the tasks. i.e. convert the number of days into hours.
gt;
gt; Also, one more...is there a way that once data is placed into one
gt; cell....the cell in the column on the right will automatically configure
gt; the
gt; current date?
gt;
gt; Thanks!
gt; Rhonda
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. Then the following
event macro will automate this process:

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

Notice:
Change the construct quot;C:Cquot; to whatever column is to hold data entry.
The row that starts with quot;Cells(quot; is to be a single line with hh:mmquot;)
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 VezeridesThank you to both! You have helped tremendously! Something so simple suddenly
bacame so complicated, and then suddenly so simple again! Thank you!

quot;Rhonda1quot; wrote:

gt; I have two questions. I have three columns that will have a calendar date in
gt; them. On the fourth column, I need to put in a formula that will count the
gt; days of the previous three columns. I can't seem to find the function that
gt; will do this for me.
gt;
gt; Second questiongt; I need a formula that will calculate the hours it took to
gt; complete the tasks. i.e. convert the number of days into hours.
gt;
gt; Also, one more...is there a way that once data is placed into one
gt; cell....the cell in the column on the right will automatically configure the
gt; current date?
gt;
gt; Thanks!
gt; Rhonda

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

quot;Rhonda1quot; gt; wrote in message
...
gt; Thank you to both! You have helped tremendously! Something so simple
gt; suddenly
gt; bacame so complicated, and then suddenly so simple again! Thank you!
gt;
gt; quot;Rhonda1quot; wrote:
gt;
gt;gt; I have two questions. I have three columns that will have a calendar
gt;gt; date in
gt;gt; them. On the fourth column, I need to put in a formula that will count
gt;gt; the
gt;gt; days of the previous three columns. I can't seem to find the function
gt;gt; that
gt;gt; will do this for me.
gt;gt;
gt;gt; Second questiongt; I need a formula that will calculate the hours it took
gt;gt; to
gt;gt; complete the tasks. i.e. convert the number of days into hours.
gt;gt;
gt;gt; Also, one more...is there a way that once data is placed into one
gt;gt; cell....the cell in the column on the right will automatically configure
gt;gt; the
gt;gt; current date?
gt;gt;
gt;gt; Thanks!
gt;gt; Rhonda

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()