ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If statements (https://www.excelbanter.com/excel-worksheet-functions/237772-if-statements.html)

Cold1

If statements
 
I am putting together a time card for my work. I have figured out how to
figure the times, but if "holiday" is put into the time slot I need "8" to go
into the hours cell automaticly. Here is my current time sheet.

=IF((OR(D11="",C11="")),0,IF((D11<C11),((D11-C11)*24)+24,(D11-C11)*24))

I need to place 8 in cell J21.

Any help would be greatly appreciated.

Thank you,

Craig Old

Fred Smith[_4_]

If statements
 
Do you mean something like this:
=if(c11="holiday",8,if(count(c11:d11)<2,0,(d11-c11+d11<c11)*24))

Regards,
Fred

"Cold1" wrote in message
...
I am putting together a time card for my work. I have figured out how to
figure the times, but if "holiday" is put into the time slot I need "8" to
go
into the hours cell automaticly. Here is my current time sheet.

=IF((OR(D11="",C11="")),0,IF((D11<C11),((D11-C11)*24)+24,(D11-C11)*24))

I need to place 8 in cell J21.

Any help would be greatly appreciated.

Thank you,

Craig Old



Teethless mama

If statements
 
Try this:

=IF(COUNTIF(C11:D11,"Holiday"),8,MOD(D11-C11,1)*24)


"Cold1" wrote:

I am putting together a time card for my work. I have figured out how to
figure the times, but if "holiday" is put into the time slot I need "8" to go
into the hours cell automaticly. Here is my current time sheet.

=IF((OR(D11="",C11="")),0,IF((D11<C11),((D11-C11)*24)+24,(D11-C11)*24))

I need to place 8 in cell J21.

Any help would be greatly appreciated.

Thank you,

Craig Old



All times are GMT +1. The time now is 03:28 PM.

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