Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default IF function using TIME

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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default IF function using TIME

=IF(A1="n/a",3,IF(B1="n/a",4,IF(B1-A1<=1/24,1,2)))

--
Gary''s Student - gsnu200805
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default IF function using TIME

Thanks so much, you have made my life so much easier!!!!!
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default IF function using TIME

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"KarenM" wrote in message ...
|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!


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default IF function using TIME

hi
try this
=IF(B6="N/A",4,IF(A6="N/A",3,IF(B6-A60.041667,2,1)))

regards
FSt1

"KarenM" wrote:

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!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default IF function using TIME

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

"FSt1" wrote:

hi
try this
=IF(B6="N/A",4,IF(A6="N/A",3,IF(B6-A60.041667,2,1)))

regards
FSt1

"KarenM" wrote:

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!

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
Time function vito Excel Worksheet Functions 2 August 10th 07 04:38 PM
verify use of TIME Function, Find Quantity Level compare to time-d nastech Excel Discussion (Misc queries) 9 July 11th 07 01:58 PM
One-time NOW() function BigD Excel Worksheet Functions 3 September 28th 06 06:24 PM
Function to convert Time String to Time Andibevan Excel Worksheet Functions 6 August 19th 05 01:19 PM
Help with Time Function LKP Excel Worksheet Functions 1 January 5th 05 03:33 PM


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