#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Phyllis B.
 
Posts: n/a
Default If Statement

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 B&C should not
exceed 160 hours. Any suggestions? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Phyllis B.
 
Posts: n/a
Default If Statement

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 & 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.


"wjohnson" wrote:


Not 100% sure what you want but here is an example
=IF(B1<160,A1-B1,0)
Example 1
A B C
160 140 20

Example 2
160 160 0

You can change the "0" to anything you want (i.e. "No Excess Hours")


--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: http://www.excelforum.com/member.php...o&userid=29640
View this thread: http://www.excelforum.com/showthread...hreadid=493944


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RagDyer
 
Posts: n/a
Default If Statement

Try this:

=IF(160-B1<=0,160,B1+MIN(160-B1,A1))

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Phyllis B." wrote in message
...
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 & 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.


"wjohnson" wrote:


Not 100% sure what you want but here is an example
=IF(B1<160,A1-B1,0)
Example 1
A B C
160 140 20

Example 2
160 160 0

You can change the "0" to anything you want (i.e. "No Excess Hours")


--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile:

http://www.excelforum.com/member.php...o&userid=29640
View this thread:

http://www.excelforum.com/showthread...hreadid=493944



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
wjohnson
 
Posts: n/a
Default If Statement


Not 100% sure what you want but here is an example
=IF(B1<160,A1-B1,0)
Example 1
A B C
160 140 20

Example 2
160 160 0

You can change the "0" to anything you want (i.e. "No Excess Hours")


--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: http://www.excelforum.com/member.php...o&userid=29640
View this thread: http://www.excelforum.com/showthread...hreadid=493944



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
wjohnson
 
Posts: n/a
Default If Statement


Ok - 1 more time

=IF(AND(B3<=160,A30,B3+A3<=160),(B3+A3),IF(A3=0,0 ,"Check"))

If this doesn't work for you
What does Cell A represent
What does Cell B represent


--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: http://www.excelforum.com/member.php...o&userid=29640
View this thread: http://www.excelforum.com/showthread...hreadid=493944

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
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
IF Statement Brent New Users to Excel 3 April 29th 05 04:24 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM


All times are GMT +1. The time now is 09:14 AM.

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"