close

3 situations would be as follow, i set the formular like this is =IF(B1lt;A1,
24/24-A6 B6,B6-A6), both A amp; B using time format and C using number format.

A B C
Start Time End Time No. of hours
10:30 15:00 4.5
00:00 08:00 8.0
08:00 23:59 16.0 **Problem**

I can get the result for the first 2, but not the last one, any one can
help, many thanks!

What's the problem?

4.5
8
15.98333is what I get using

=(B1-A1 (A1gt;B1))*24

are you saying that you want to round, if so what's the rounding criteria?
Nearest .25 using decimal hours? If so

=ROUND((B1-A1 (A1gt;B1))*24/0.25,0)*0.25

will return 16
--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon

quot;evonquot; gt; wrote in message
...
gt;3 situations would be as follow, i set the formular like this is =IF(B1lt;A1,
gt; 24/24-A6 B6,B6-A6), both A amp; B using time format and C using number
gt; format.
gt;
gt; A B C
gt; Start Time End Time No. of hours
gt; 10:30 15:00 4.5
gt; 00:00 08:00 8.0
gt; 08:00 23:59 16.0 **Problem**
gt;
gt; I can get the result for the first 2, but not the last one, any one can
gt; help, many thanks!Hi!

Try this:

=(B6-A6 (B6lt;A6))*24

Copy down as needed.

Returns:

4.5
8
15.9833333333333

Biff

quot;evonquot; gt; wrote in message
...
gt;3 situations would be as follow, i set the formular like this is =IF(B1lt;A1,
gt; 24/24-A6 B6,B6-A6), both A amp; B using time format and C using number
gt; format.
gt;
gt; A B C
gt; Start Time End Time No. of hours
gt; 10:30 15:00 4.5
gt; 00:00 08:00 8.0
gt; 08:00 23:59 16.0 **Problem**
gt;
gt; I can get the result for the first 2, but not the last one, any one can
gt; help, many thanks!
Yup, that is what i am looking for the rounding problem, and it works
perfectly would you explain a little bit the logic behind, many thanks!

Regards,
evon

quot;Peo Sjoblomquot; wrote:

gt; What's the problem?
gt;
gt; 4.5
gt; 8
gt; 15.98333
gt;
gt;
gt; is what I get using
gt;
gt; =(B1-A1 (A1gt;B1))*24
gt;
gt; are you saying that you want to round, if so what's the rounding criteria?
gt; Nearest .25 using decimal hours? If so
gt;
gt; =ROUND((B1-A1 (A1gt;B1))*24/0.25,0)*0.25
gt;
gt; will return 16
gt;
gt;
gt;
gt; --
gt;
gt; Regards,
gt;
gt; Peo Sjoblom
gt;
gt; Northwest Excel Solutions
gt;
gt; www.nwexcelsolutions.com
gt;
gt; (remove ^^ from email address)
gt;
gt; Portland, Oregon
gt;
gt;
gt;
gt;
gt; quot;evonquot; gt; wrote in message
gt; ...
gt; gt;3 situations would be as follow, i set the formular like this is =IF(B1lt;A1,
gt; gt; 24/24-A6 B6,B6-A6), both A amp; B using time format and C using number
gt; gt; format.
gt; gt;
gt; gt; A B C
gt; gt; Start Time End Time No. of hours
gt; gt; 10:30 15:00 4.5
gt; gt; 00:00 08:00 8.0
gt; gt; 08:00 23:59 16.0 **Problem**
gt; gt;
gt; gt; I can get the result for the first 2, but not the last one, any one can
gt; gt; help, many thanks!
gt;
gt;

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

software

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