Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jeff Thomas
 
Posts: n/a
Default I need help with the IF Statement

I am trying to use the if statement if excel, I have it working for the most
part, but it needs on more variable, and I am confused.

All numbers are times from a time clock so they are 24hr format with
hundreths.

=IF(H10A10,H10-A10-G10,H10-A10+24-G10)

the only problem is when H10 and A10 are blank, I get 24 as a result, I know
that is what I have told it to do, but I also want it to return zero if H10
and A10 are blank, or have 0's.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bobby
 
Posts: n/a
Default I need help with the IF Statement

Jeff
If your formula works other wise, try:
=IF(AND(H100,A100),IF(H10A10,H10-A10-G10,H10-A10+24-G10),0)

HTH


"Jeff Thomas" wrote:

I am trying to use the if statement if excel, I have it working for the most
part, but it needs on more variable, and I am confused.

All numbers are times from a time clock so they are 24hr format with
hundreths.

=IF(H10A10,H10-A10-G10,H10-A10+24-G10)

the only problem is when H10 and A10 are blank, I get 24 as a result, I know
that is what I have told it to do, but I also want it to return zero if H10
and A10 are blank, or have 0's.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elkar
 
Posts: n/a
Default I need help with the IF Statement

Will this work?

=IF(AND(A10=0,H10=0),0,IF(H10A10,H10-A10-G10,H10-A10+24-G10))

HTH,
Elkar

"Jeff Thomas" wrote:

I am trying to use the if statement if excel, I have it working for the most
part, but it needs on more variable, and I am confused.

All numbers are times from a time clock so they are 24hr format with
hundreths.

=IF(H10A10,H10-A10-G10,H10-A10+24-G10)

the only problem is when H10 and A10 are blank, I get 24 as a result, I know
that is what I have told it to do, but I also want it to return zero if H10
and A10 are blank, or have 0's.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jeff Thomas
 
Posts: n/a
Default I need help with the IF Statement

Bobby,
Works great, I knew it was something easy, I used excel in the Army and
became very proficient with it, so I knew the statement could be used, I just
could no remember all the variables.

Thanks again.

Jeff

"Bobby" wrote:

Jeff
If your formula works other wise, try:
=IF(AND(H100,A100),IF(H10A10,H10-A10-G10,H10-A10+24-G10),0)

HTH


"Jeff Thomas" wrote:

I am trying to use the if statement if excel, I have it working for the most
part, but it needs on more variable, and I am confused.

All numbers are times from a time clock so they are 24hr format with
hundreths.

=IF(H10A10,H10-A10-G10,H10-A10+24-G10)

the only problem is when H10 and A10 are blank, I get 24 as a result, I know
that is what I have told it to do, but I also want it to return zero if H10
and A10 are blank, or have 0's.



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 nightmare eugenevr Excel Discussion (Misc queries) 6 May 18th 05 01:09 PM
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM


All times are GMT +1. The time now is 05:46 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"