I've got a lot of data on a particular spread sheet (lots of them actually) and am interested in calculating some basic stats on it. I would like to have a formula or macro examine each sheet and tell me the number of total items (lines of data - 1 for the heading) and the number of total UNIQUE items for a particular column.
I'm not sure if this is further complicated by the fact that there are 500-1000+ lines that are empty. To eliminate the headers/footers from the external report, I ran a FOR/NEXT loop to ClearContents of a row if a cell's criteria matched certain things. I thought about deleting the row, but that would make my FOR/NEXT loop skip every other row when one was deleted (& renumbered). I'm thinking about redoing my routine to axe those header/footer lines, but haven't given it much thought yet.
One possible (albeit ugly) solution would be to take Mr.Excel's Table of Contents example and just extrapolate it to get those values for both unique/non-unique pages then do the math to calculate how many lines per page to get a rough estimate.
Another solution I've thought of, again pretty ugly, would be to step through each cell of a column, set the string value to the new cell value and compare to the old string value, if different then sum, if same them next row... something like that...
Your suggestion on this would be greatly appreciated.
I'm not sure if this is further complicated by the fact that there are 500-1000+ lines that are empty. To eliminate the headers/footers from the external report, I ran a FOR/NEXT loop to ClearContents of a row if a cell's criteria matched certain things. I thought about deleting the row, but that would make my FOR/NEXT loop skip every other row when one was deleted (& renumbered). I'm thinking about redoing my routine to axe those header/footer lines, but haven't given it much thought yet.
One possible (albeit ugly) solution would be to take Mr.Excel's Table of Contents example and just extrapolate it to get those values for both unique/non-unique pages then do the math to calculate how many lines per page to get a rough estimate.
Another solution I've thought of, again pretty ugly, would be to step through each cell of a column, set the string value to the new cell value and compare to the old string value, if different then sum, if same them next row... something like that...
Your suggestion on this would be greatly appreciated.