• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

search state condition start and end dates?

please help to find the solution??

search state condition start and end dates

See sheet "DATOS"
 

Attachments

  • HELP PLEASE.xlsx
    22.7 KB · Views: 4
Could you elaborate more on what you want to happen? I'm not even sure if you need formulas to read info from DATOS, or if DATOS should read from Hoja3
 
Could you perhaps explain through words what the formula is trying to do then? If all we have is your formula, we can only use the logic which is in the formula, and apparently it's wrong. You show that some cells should result in "PE", but PE is not listed on DATOS.

But, trying to take a guess, I think the formula in I7 needs to be:
=INDEX(DATOS!T:T,SUMPRODUCT(ROW(DATOS!$U$2:$U$25)*(DATOS!$U$2:$U$25<=D7)*(DATOS!$V$2:$V$25>=D7)*(DATOS!$S$2:$S$25=A7)))
 
the formula in I7 needs to be:

if hour entrance >= hour real then show difference in minutes else ,,if hour entrance <= hour real show "A", else If hour entrance=time out show "NME"

but also ,read status from DATOS between START DATE and final date .

THE RESULT SHOULD BE AS SHOWN IN COLUMN J

sorry is "P" no "PE"
 
Can you clarify your conditions? You stated two conditions for when hour entrance = hour real. Either the first is >= and the other is <, or first is > and other is <=. Should not be both.

So, possible outcomes are either difference in minutes, A, NME, or a lookup from DATOS?
 
Still need clarification on conditions. Hour entrance will either be >=, or < hour real. There is no third option. What order should we be checking the conditions?
 
1-hour entrance> hour real
condition calculate difference minutes
2 if hour entrance < hour real
condition "A"
3 if hour entrance = hour real
condition "NME"
4 - also ,read status from DATOS between START DATE and final date ,put in same condition,should be as the result of the column j
 
Now the first three conditions work ok, but still don't see when 4th gets triggered.
Here's a pic for example
upload_2014-8-29_13-4-6.png

Given latest 3 rules, why is the reponse not "A" for both, since Hour entrance < Hour Real?
 
So, should the logic then be:
1. Check if there is a record on DATOS with matching name and Date in between start/final. If true, return that status.
2. If False for #1, then check the following:
1-hour entrance> hour real
condition calculate difference minutes
2 if hour entrance < hour real
condition "A"
3 if hour entrance = hour real
condition "NME"
 
In I2, put this formula:
=IFERROR(INDEX(DATOS!T:T,(1/SUMPRODUCT(ROW(DATOS!$U$2:$U$25)*(DATOS!$U$2:$U$25<=D2)*(DATOS!$V$2:$V$25>=D2)*(DATOS!$S$2:$S$25=A2)))^-1),IF(H2=B2,"NME",IF(B2<H2,"A",B2-H2)))

Format cell with number format:
[mm]
 
Back
Top