#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default IF question

Hi, i have this code:
=IF(M5<B5,"Late ","Early ")&TEXT(ABS(M5-B5),"hh:mm:ss")

I need it a little more complex.

I need the code to look in F5 and if the code find "COS" to know that the
reference is in M5. If the code find (ACE) to know that the reference in in
L5. After that, the code to look in B5. If the time is smaller than M5 or L5,
the result to be "early". If the time is bigger, than the result to display
"late".
Can this be done?
Thanks in advance.





  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF question

One try:
=IF(F5="COS",IF(M5<B5,"Late ","Early ")&TEXT(ABS(M5-B5),"hh:mm:ss"),
IF(F5="ACE",IF(L5<B5,"Late ","Early ")&TEXT(ABS(L5-B5),"hh:mm:ss"),""))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"puiuluipui" wrote:
Hi, i have this code:
=IF(M5<B5,"Late ","Early ")&TEXT(ABS(M5-B5),"hh:mm:ss")

I need it a little more complex.

I need the code to look in F5 and if the code find "COS" to know that the
reference is in M5. If the code find (ACE) to know that the reference in in
L5. After that, the code to look in B5. If the time is smaller than M5 or L5,
the result to be "early". If the time is bigger, than the result to display
"late".
Can this be done?
Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default IF question

It's working, but i have one more question. In B5 with "COS" , the code can
sometimes find 08:00:00 and 12:30:00, so the reference can be either M5 or L5
Can the code, only in "cos", display the result by the time? The same thing
with "late" and "early".

If it's less than 11:00:00 the reference to be "L5"
If it's bigger than 11:00:00 the reference to be "M5"

Thanks in advance.


"Max" a scris:

One try:
=IF(F5="COS",IF(M5<B5,"Late ","Early ")&TEXT(ABS(M5-B5),"hh:mm:ss"),
IF(F5="ACE",IF(L5<B5,"Late ","Early ")&TEXT(ABS(L5-B5),"hh:mm:ss"),""))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"puiuluipui" wrote:
Hi, i have this code:
=IF(M5<B5,"Late ","Early ")&TEXT(ABS(M5-B5),"hh:mm:ss")

I need it a little more complex.

I need the code to look in F5 and if the code find "COS" to know that the
reference is in M5. If the code find (ACE) to know that the reference in in
L5. After that, the code to look in B5. If the time is smaller than M5 or L5,
the result to be "early". If the time is bigger, than the result to display
"late".
Can this be done?
Thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF question

It's working ...
Welcome, but pl mark that response by clicking the YES button there

but i have one more question ..


Maybe this:
=IF(AND(F5="COS",B5 --"11:00:00"),IF(M5<B5,"Late ","Early
")&TEXT(ABS(M5-B5),"hh:mm:ss"),IF(OR(F5="ACE",AND(F5="COS",B5<=
--"11:00:00")),IF(L5<B5,"Late ","Early ")&TEXT(ABS(L5-B5),"hh:mm:ss"),""))

If above helps, pl mark this response as well
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
--
"puiuluipui" wrote:
It's working, but i have one more question. In B5 with "COS" , the code can
sometimes find 08:00:00 and 12:30:00, so the reference can be either M5 or L5
Can the code, only in "cos", display the result by the time? The same thing
with "late" and "early".

If it's less than 11:00:00 the reference to be "L5"
If it's bigger than 11:00:00 the reference to be "M5"

Thanks in advance.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default IF question

I allways do click on yes.
Can you help me with the last question?
Thanks allot.

"Max" a scris:

It's working ...

Welcome, but pl mark that response by clicking the YES button there

but i have one more question ..


Maybe this:
=IF(AND(F5="COS",B5 --"11:00:00"),IF(M5<B5,"Late ","Early
")&TEXT(ABS(M5-B5),"hh:mm:ss"),IF(OR(F5="ACE",AND(F5="COS",B5<=
--"11:00:00")),IF(L5<B5,"Late ","Early ")&TEXT(ABS(L5-B5),"hh:mm:ss"),""))

If above helps, pl mark this response as well
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
--
"puiuluipui" wrote:
It's working, but i have one more question. In B5 with "COS" , the code can
sometimes find 08:00:00 and 12:30:00, so the reference can be either M5 or L5
Can the code, only in "cos", display the result by the time? The same thing
with "late" and "early".

If it's less than 11:00:00 the reference to be "L5"
If it's bigger than 11:00:00 the reference to be "M5"

Thanks in advance.




  #6   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF question

Can you help me with the last question?
um, perhaps you missed my venture for you in my last response?
reproduced below:

but i have one more question ..


Maybe this:
=IF(AND(F5="COS",B5 --"11:00:00"),IF(M5<B5,"Late ","Early
")&TEXT(ABS(M5-B5),"hh:mm:ss"),IF(OR(F5="ACE",AND(F5="COS",B5<=
--"11:00:00")),IF(L5<B5,"Late ","Early ")&TEXT(ABS(L5-B5),"hh:mm:ss"),""))

If above helps, pl mark this response as well
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---

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
SUM IF QUESTION PLEASE HELP llong3316 Excel Worksheet Functions 0 May 14th 08 02:52 PM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
Question Poo Excel Discussion (Misc queries) 2 June 13th 07 01:13 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM


All times are GMT +1. The time now is 11:16 PM.

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"