Thread: Formula Help
View Single Post
  #7   Report Post  
Diana
 
Posts: n/a
Default

Okay, here is what i am trying to do, for everyday of the week, the people
put how many hours they attended.

A1:8
B1:8
C1:8
D1:8
E1:8

I want cell H1 to add those to 40 hours. Now, some people attend more than
just those 40 hours. So other cells have more hours.
F1:6
G1:6

What I need is a formula that only counts their hours and stops at 40. Is
this explanation better?

"Sloth" wrote:

By adding the MIN function to C4 you are saying "ouput either 40 or the sum
of these numbers"

EDIT: Sorry this comment wasn't finished. It is supposed to be...

By adding the MIN function to C4 you are saying "ouput either 40 or the sum
of these numbers, WHICHEVER IS smaller"

"Sloth" wrote:

Give an example of what format the data is in.

Here is an example how I would handle it.

This is data that is inputed by you...
A1: 8:00 AM
A2: 7:30 AM
A3: 8:00 AM
B1: 5:00 PM
B2: 6:00 PM
B3: 5:45 PM

And the output formulas would be like this...
C1: =24*(B1-A1)
C2: =24*(B2-A2)
C3: =24*(B3-A3)
C4: =SUM(C1:C3)

The output would look like this (you need to change the format to numbers)
C1: 9.00
C2: 10.50
C3: 9.75
C4: 29.25

By adding the MIN function to C4 you are saying "ouput either 40 or the sum
of these numbers"

Example:
C4: =MIN(20,SUM(C1:C3))
outputs
C4: 20
because 20 is less than 29.25
But
C4: =MIN(40,SUM(C1:C3))
outputs
C4: 29.25

In your case you would need to use 40 in the MIN function.

Hope this makes things clear.

"Diana" wrote:

I was wondering if someone could help me. I was needing a formula that could
count how many hours someone has but for it to stop counting at 40. I hope
someone understands me. Thank You.