Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
I need help with the IF Statement
Hi Jeff
Try IF(OR(A10="",H10=0,A10="",H10=""),0,IF((H10A10,H1 0-A10-G10,H10-A10+24-G10)) hth -- ve_2nd_at. Stilfontein, Northwest, South Africa "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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
I need help with the IF Statement
Jeff,
Being as both parts of your formula had the same subtractions apart from the +24, you could use: =H10-A10-G10+(H10A10)*24 -- HTH Sandy with @tiscali.co.uk "Jeff Thomas" <Jeff wrote in message ... 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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If statement | Excel Discussion (Misc queries) | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions | |||
IF Statement nightmare | Excel Discussion (Misc queries) | |||
How do I fix a circular reference in a financial statement? | Excel Discussion (Misc queries) | |||
7+ nested if statement? | Excel Worksheet Functions |