I have students doing a project where they collect data from a cemetery and record the age of the person and the year he/she died. It copies into a table where I have Macros that filter certain criteria (i.e. "Ages from 10-19" or "Death Year from 1880-1889"). I was hoping to be able to have a =COUNT formula that tells me how many people died after those filters have been used (i.e. count number of people who died within years 1880-1889 and were between ages 10-19). I guess I'm running into two problems:
1) After I filter my criteria, obviously the range of data that I wish to count changes depending on the criteria (could be 100 rows for one thing and 213 rows for another). I tried recording a macro that counts a ctrl+shift+down after I filter, but the code will only count the same number of cells, even after I add more data. The macro recorded a count of 3 deaths from 1810-1819 ages 0-9, but when I added another person and ran my macro filters, the =count function still showed 3 instead of 4.
2) Maybe I'm trying to do something too complicated. I noticed when I filter a table, the rows that don't qualify still exist and rather they just "disappear." The table will jump in rows going 5, 6, 7, 27. I only want to =count the people that are still showing; however, when I tried the =count function differently from problem (1) from above, is still included 5-27. This would be the whole table of values whether they are currently showing or not.
If someone has a solution to my problem (whether a different code I need to be using for my macros or possibly a different way of going about my data organization besides a table), please let me know!
1) After I filter my criteria, obviously the range of data that I wish to count changes depending on the criteria (could be 100 rows for one thing and 213 rows for another). I tried recording a macro that counts a ctrl+shift+down after I filter, but the code will only count the same number of cells, even after I add more data. The macro recorded a count of 3 deaths from 1810-1819 ages 0-9, but when I added another person and ran my macro filters, the =count function still showed 3 instead of 4.
2) Maybe I'm trying to do something too complicated. I noticed when I filter a table, the rows that don't qualify still exist and rather they just "disappear." The table will jump in rows going 5, 6, 7, 27. I only want to =count the people that are still showing; however, when I tried the =count function differently from problem (1) from above, is still included 5-27. This would be the whole table of values whether they are currently showing or not.
If someone has a solution to my problem (whether a different code I need to be using for my macros or possibly a different way of going about my data organization besides a table), please let me know!