ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   WHY doesn't formula work??? (https://www.excelbanter.com/excel-discussion-misc-queries/167688-why-doesnt-formula-work.html)

TSuraco

WHY doesn't formula work???
 
I'm trying to track straight time vs. Overtime. I want H16 to add columns
H16:L16 (where time totals are) & I then want G16 to subtract 40 if H16 is
greater than 40. I've tried everything I can think of. Help!!!!

=(SUM(H16:L16)-40)
=IF(SUM(H16:L16)40 -40) (I dunno)

Cortez

WHY doesn't formula work???
 
On Nov 28, 1:38 pm, TSuraco wrote:
I'm trying to track straight time vs. Overtime. I want H16 to add columns
H16:L16 (where time totals are) & I then want G16 to subtract 40 if H16 is
greater than 40. I've tried everything I can think of. Help!!!!

=(SUM(H16:L16)-40)
=IF(SUM(H16:L16)40 -40) (I dunno)



Try:

=if(sum(H16:L16)40,Sum(H16:L16)-40)

Or, if your time values are formatted as Time (ex: HH:MM:SS) then try
subtracting time(40,0,0)

=if(sum(H16:L16)40,Sum(H16:L16)-TIME(40,0,0)

Ctk

Conan Kelly

WHY doesn't formula work???
 
TSuraco,

What do you want if the sum is less than/equal to 40?

This formula will return 0 if <= 40:

=if(sum(h16:l16)40,sum(h16:l16)-40,0)

Change the last 0 after the comma to what ever you need:

"" (empty quotes) will make the cell appear to be blank
"No overtime this pay period" (be sure to include the quotes) will
return that phrase in the cell.

HTH,

Conan


"TSuraco" wrote in message
...
I'm trying to track straight time vs. Overtime. I want H16 to add columns
H16:L16 (where time totals are) & I then want G16 to subtract 40 if H16 is
greater than 40. I've tried everything I can think of. Help!!!!

=(SUM(H16:L16)-40)
=IF(SUM(H16:L16)40 -40) (I dunno)




Bill Kuunders

WHY doesn't formula work???
 
You cannot have H16 to add cells H16 to L16

H16 is part of the range you want to add

your first formula will work if you add the cells H16 to L16 in a different
cell first and then
have another cell deduct 40
I'e'
M16 ....=sum(H16:L16)
N16........=sum(H16:L16)-40
or
N16........=M16-40

--
Greetings from New Zealand

"TSuraco" wrote in message
...
I'm trying to track straight time vs. Overtime. I want H16 to add columns
H16:L16 (where time totals are) & I then want G16 to subtract 40 if H16 is
greater than 40. I've tried everything I can think of. Help!!!!

=(SUM(H16:L16)-40)
=IF(SUM(H16:L16)40 -40) (I dunno)




TSuraco

WHY doesn't formula work???
 
ThankYou! Thank You! Thank You!!

"Cortez" wrote:

On Nov 28, 1:38 pm, TSuraco wrote:
I'm trying to track straight time vs. Overtime. I want H16 to add columns
H16:L16 (where time totals are) & I then want G16 to subtract 40 if H16 is
greater than 40. I've tried everything I can think of. Help!!!!

=(SUM(H16:L16)-40)
=IF(SUM(H16:L16)40 -40) (I dunno)



Try:

=if(sum(H16:L16)40,Sum(H16:L16)-40)

Or, if your time values are formatted as Time (ex: HH:MM:SS) then try
subtracting time(40,0,0)

=if(sum(H16:L16)40,Sum(H16:L16)-TIME(40,0,0)

Ctk


TSuraco

WHY doesn't formula work???
 
OMG!!! Even BETTER!!! Ty, Ty, Ty!!!!!!!

"Conan Kelly" wrote:

TSuraco,

What do you want if the sum is less than/equal to 40?

This formula will return 0 if <= 40:

=if(sum(h16:l16)40,sum(h16:l16)-40,0)

Change the last 0 after the comma to what ever you need:

"" (empty quotes) will make the cell appear to be blank
"No overtime this pay period" (be sure to include the quotes) will
return that phrase in the cell.

HTH,

Conan


"TSuraco" wrote in message
...
I'm trying to track straight time vs. Overtime. I want H16 to add columns
H16:L16 (where time totals are) & I then want G16 to subtract 40 if H16 is
greater than 40. I've tried everything I can think of. Help!!!!

=(SUM(H16:L16)-40)
=IF(SUM(H16:L16)40 -40) (I dunno)






All times are GMT +1. The time now is 12:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com