close

I have a worksheet with the following columns

A B C
Excess Hrs Hours Wrkd

I want a fornula that will say, if the hours in column B are less than 160,
then I want to enter the difference in cell C, but only to the extent that
there are excess hours available (from cell A). The total of Bamp;C should not
exceed 160 hours. Any suggestions? Thanks.

That works if the three cells always equal 160. Suppose I have this in the
the cells

A B C
88.5 140

I would only want to use 20 of the excess hours, because I don't want to
exceed 160 in cells b amp; C.

It could also look like this:

A B C
15 85

I would want to put the entire 15 hours in cell C. or

A B C
0 130

Cell C would be 0, because there are no excess hours to use.

The total doesn't have to be 160, it just cannot exceed 160.

thanks.quot;wjohnsonquot; wrote:

gt;
gt; Not 100% sure what you want but here is an example
gt; =IF(B1lt;160,A1-B1,0)
gt; Example 1
gt; A B C
gt; 160 140 20
gt;
gt; Example 2
gt; 160 160 0
gt;
gt; You can change the quot;0quot; to anything you want (i.e. quot;No Excess Hoursquot;)
gt;
gt;
gt; --
gt; wjohnson
gt; ------------------------------------------------------------------------
gt; wjohnson's Profile: www.excelforum.com/member.php...oamp;userid=29640
gt; View this thread: www.excelforum.com/showthread...hreadid=493944
gt;
gt;

Try:

=MIN(160-B1,A1)

--
HTH

Sandy
with @tiscali.co.uk

quot;Phyllis B.quot; gt; wrote in message
...
gt; That works if the three cells always equal 160. Suppose I have this in
gt; the
gt; the cells
gt;
gt; A B C
gt; 88.5 140
gt;
gt; I would only want to use 20 of the excess hours, because I don't want to
gt; exceed 160 in cells b amp; C.
gt;
gt; It could also look like this:
gt;
gt; A B C
gt; 15 85
gt;
gt; I would want to put the entire 15 hours in cell C. or
gt;
gt; A B C
gt; 0 130
gt;
gt; Cell C would be 0, because there are no excess hours to use.
gt;
gt; The total doesn't have to be 160, it just cannot exceed 160.
gt;
gt; thanks.
gt;
gt;
gt; quot;wjohnsonquot; wrote:
gt;
gt;gt;
gt;gt; Not 100% sure what you want but here is an example
gt;gt; =IF(B1lt;160,A1-B1,0)
gt;gt; Example 1
gt;gt; A B C
gt;gt; 160 140 20
gt;gt;
gt;gt; Example 2
gt;gt; 160 160 0
gt;gt;
gt;gt; You can change the quot;0quot; to anything you want (i.e. quot;No Excess Hoursquot;)
gt;gt;
gt;gt;
gt;gt; --
gt;gt; wjohnson
gt;gt; ------------------------------------------------------------------------
gt;gt; wjohnson's Profile:
gt;gt; www.excelforum.com/member.php...oamp;userid=29640
gt;gt; View this thread:
gt;gt; www.excelforum.com/showthread...hreadid=493944
gt;gt;
gt;gt;
Try this:

=IF(160-B1lt;=0,160,B1 MIN(160-B1,A1))

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================quot;Phyllis B.quot; gt; wrote in message
...
gt; That works if the three cells always equal 160. Suppose I have this in
the
gt; the cells
gt;
gt; A B C
gt; 88.5 140
gt;
gt; I would only want to use 20 of the excess hours, because I don't want to
gt; exceed 160 in cells b amp; C.
gt;
gt; It could also look like this:
gt;
gt; A B C
gt; 15 85
gt;
gt; I would want to put the entire 15 hours in cell C. or
gt;
gt; A B C
gt; 0 130
gt;
gt; Cell C would be 0, because there are no excess hours to use.
gt;
gt; The total doesn't have to be 160, it just cannot exceed 160.
gt;
gt; thanks.
gt;
gt;
gt; quot;wjohnsonquot; wrote:
gt;
gt; gt;
gt; gt; Not 100% sure what you want but here is an example
gt; gt; =IF(B1lt;160,A1-B1,0)
gt; gt; Example 1
gt; gt; A B C
gt; gt; 160 140 20
gt; gt;
gt; gt; Example 2
gt; gt; 160 160 0
gt; gt;
gt; gt; You can change the quot;0quot; to anything you want (i.e. quot;No Excess Hoursquot;)
gt; gt;
gt; gt;
gt; gt; --
gt; gt; wjohnson
gt; gt; ------------------------------------------------------------------------
gt; gt; wjohnson's Profile:
www.excelforum.com/member.php...oamp;userid=29640
gt; gt; View this thread:
www.excelforum.com/showthread...hreadid=493944
gt; gt;
gt; gt;
Not 100% sure what you want but here is an example
=IF(B1lt;160,A1-B1,0)
Example 1
A B C
160 140 20

Example 2
160 160 0

You can change the quot;0quot; to anything you want (i.e. quot;No Excess Hoursquot;)--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: www.excelforum.com/member.php...oamp;userid=29640
View this thread: www.excelforum.com/showthread...hreadid=493944
Ok - 1 more time

=IF(AND(B3lt;=160,A3gt;0,B3 A3lt;=160),(B3 A3),IF(A3=0,0 ,quot;Checkquot;))

If this doesn't work for you
What does Cell A represent
What does Cell B represent--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: www.excelforum.com/member.php...oamp;userid=29640
View this thread: www.excelforum.com/showthread...hreadid=493944

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

    software

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