View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Combine Advanced Filter with a loop?

Ray,

You could use a pivot table to do all that your describe - show all your desired values in one
table, allow the user to choose the specific set of data being viewed at any one time, etc.

HTH,
Bernie
MS Excel MVP


"Ray" wrote in message
...
Hi -

This one's got me in knots ... hoping someone can help ... :)

On Sheet1 9 (named 'tracker'), columns B-H contain information related
to employee performance (namely, missed time-clock punches). Column B
holds the date of the infraction. Users interact with Sheet1 via one
two userforms -- 'DateEntry' and 'Report'.

The 'Report' userform contains a listbox ('empData') that initializes
with all data from the 'Tracker' worksheet (using a dynamic named
range = 'nrData'). There're also 2 textboxes ("tframe" and "MPno")
that will hold user entered parameters ... now we get to the real
question.

I need a procedure that will take the values of 'tframe' and 'MPno'
and apply them to nrData, returning a list of employees that meet the
2 criteria. For example:
tframe = 30
MPno = 3

The procedure would loop through nrData and return a list of employees
(and their data from nrData) that had 3 or more missed time-clock
punches in the last 30 days.

I have absolutely no idea where to start with this ... I *think* an
Advanced-Filter may be needed, but beyond that, I'm lost .... Help!

TIA,
Ray