Solved

Selecting 3 records before and 3 after

Posted on 2015-02-04
7
48 Views
Last Modified: 2016-02-11
Hi Experts

We have a data that contains a route id, drop sequence, truck id and if it participates in our program (yes or no).  What we would like is to get a new tab that would show us the truck, the participants (those marked "YES") and the 3 stops (using drop sequence) before the record and 3 after (ones marked "no")  so we would end up with 7 records total for each routeid (including the one marked "yes".

Any help would be greatly appreciated.
0
Comment
Question by:spudmcc
  • 4
  • 3
7 Comments
 
LVL 7

Expert Comment

by:Katie Pierce
ID: 40589303
Can you upload a sample of the data layout you have?
0
 

Author Comment

by:spudmcc
ID: 40589328
It would have to be sorted by Truck then by Route then by Drop #
EXAMPLE.xlsx
0
 
LVL 7

Expert Comment

by:Katie Pierce
ID: 40589352
Have you tried a Pivot Table yet?
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:spudmcc
ID: 40589537
Yes, the problem is that it will give me the universe but won't give the just the 3 records below and the 3 records above itself.
0
 
LVL 7

Expert Comment

by:Katie Pierce
ID: 40590123
OK, I got so far as associating the 3 before and the three after with all the YESes.  At this point you'd probably need a VBA to condense the data on a new tab and unfortunately I'm not at all versed in VBAs.

Personally, I'd copy and paste values, then sort all the YESes together (you have to copy and paste values, otherwise the Before/After formulas will pull the wrong data).
0
 
LVL 7

Accepted Solution

by:
Katie Pierce earned 500 total points
ID: 40590124
Oops, here's the file
EXAMPLE-1.xlsx
0
 

Author Closing Comment

by:spudmcc
ID: 40590740
Thank you so much for your time and knowledge.  This will save us lots of time.  

Andy
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This is an Add-On procedure to be used in conjunction with the code provided in Reducing EE Email Clutter using Outlook (http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/A_3146-Outlook-Processing-EE-emails-on-Receive.…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now