PDA

View Full Version : Date Tracking NEW



Pancakes1032
11-14-2014, 05:52 PM
I need a little help with this code. I'm trying to be able to track the data of certain cells and columns. I got this to work on another workbook for different columns though and somehow cannot seem to get this to work for this one. It is counting all the data collectively and not counting by the date ranges or by the month range like it should. I have attached the shell of the workbook with the important data removed, but everything in the same columns and tracking the same, I just changed some names.

If you click the update master button for the date ranges, you'll see it's technically working, just not counting the correct dates or months. Please help.

Roger Govier
11-15-2014, 02:22 AM
Hi

I have not read through all of your code, but in your routine Main, you are doing a lot of un-necessary looping (IMO)
Having made your selection on the sheet and applied Autofilter, you could just set the filter on Date assigned to be Between your start Date and end Date.
Then
selection.offset(1).SpecialCells(xlCellTypeVisible).rows.count
would give you a count of the visible rows, excluding the header
If it is 0, then no data within your date range so process the next sheet
Else
cycle through setting the filter on column I (Status) for each of your criteria, (leaving your data filter still set on column B) and the
selection.offset(1).SpecialCells(xlCellTypeVisible).rows.count
will give the result for each category
Clear the filter then continue processing.

Pancakes1032
11-15-2014, 10:10 AM
I apologize. I'm not very good at coding so I'm not following very well. Could you possibly write out the that you're trying to say? I understand what you want me to change, but not exactly where you want me to enter it. Thanks!