IF function using TIME

K

KarenM

I have a spreadsheet with: Column A showing Administration Time, Column B
showing Start Time.

I now need to create an "IF" function that can do the following:
If the total time difference between B and A (column B-Column A) is less
than or equal to 1 hour, then the true statement should be "1", if the time
is greater than 1 hour the result would be a 2, if Column A has text "n/a"
the result would be 3, and if Column B has the text "n/a" the result should
be 4.

I'm not sure how to do and IF command with so many options and that includes
time.

Thanks!
 
N

Niek Otten

=IF(ISNA(A1),3,IF(ISNA(B1),4,IF(B1-A1<1/24,1,2)))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I have a spreadsheet with: Column A showing Administration Time, Column B
| showing Start Time.
|
| I now need to create an "IF" function that can do the following:
| If the total time difference between B and A (column B-Column A) is less
| than or equal to 1 hour, then the true statement should be "1", if the time
| is greater than 1 hour the result would be a 2, if Column A has text "n/a"
| the result would be 3, and if Column B has the text "n/a" the result should
| be 4.
|
| I'm not sure how to do and IF command with so many options and that includes
| time.
|
| Thanks!
 
K

KarenM

Thanks, I have learned something new and I can actually use it for more
things I need to do with this spreadsheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top