#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default 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

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 Statements Joe Excel Worksheet Functions 2 June 30th 08 05:48 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
How My If Or Statements John Excel Worksheet Functions 1 April 24th 06 07:50 PM
if and and statements Combining multiple if & and statements Charts and Charting in Excel 2 April 20th 06 01:29 PM
If Statements tropezfn Excel Worksheet Functions 6 April 11th 06 04:58 PM


All times are GMT +1. The time now is 06:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"