EDIT: This bears no relation to your recent post but is a resolution of prior post issues. Does not require any additional cells... and should work based on my interpretation of your criteria.
I would first suggest you alter your INDEX array formula in Results C6 onwards to be:
The above will return the last valid index position for each ID ... for ex if the ID record has status of N it will add 7 days to the date in A before checking it's validity against date set in B2 on results tab... using your example data, row 119 for ID 955155 was previously returning index position of 87 but given the date on this entry is 4/10/2008 - ie the same as B2 -- and the fact that the status is N this is an invalid record... the above revised formula would return index position of 2 as this is the last *valid* record <= Results B2 date.
The formula you have in B needs to be adjusted to account for those records where INDEX position returned is 0 -- where 0 it therefore follows there is no valid record and thus result must be S -- I would therefore advise you use the following formula in Results B6 onwards.. you can also remove one of your tests
You could use an OR (re: OR(C6=0,INDEX(...)="S"),"S") but then you're doing the INDEX even when not required (ie C = 0)
I hope the above resolve your issues.
Bookmarks