formula to select sample

User avatar
cshenoy
StarLounger
Posts: 59
Joined: 08 Feb 2010, 14:26
Location: Lawrence, KS

formula to select sample

Post by cshenoy »

I need a formula to select a sample. I have 2 main criteria. If either is yes, then it's a candidate. The other criteria are: I need 2 years of data before and after the year the criterion is met. If the criterion is met again before the end of the 5 yr period, it's not in the sample (non-overlapping periods)

In the example, attached I have one company that qualifies in 4 different years, but only two non-overlapping periods. The second company doesn't meet any criteria.

I hope this is clear enough. Thanks for your help!
You do not have the required permissions to view the files attached to this post.
Cathy

User avatar
HansV
Administrator
Posts: 78528
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: formula to select sample

Post by HansV »

I think the attached version does what you want. I needed an auxiliary column.
example.xlsx
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
cshenoy
StarLounger
Posts: 59
Joined: 08 Feb 2010, 14:26
Location: Lawrence, KS

Re: formula to select sample

Post by cshenoy »

Thanks Hans!

I'd still be working on this. It's a big help! I had gotten close with 4 columns, but still wasn't there yet.
Cathy