Hello everyone,
I have attached an example database where I have repeats of test outcomes ("normal" or "abnormal") inputted alongside the test date over different time periods per person. At the end of each test I have counts of the total number of tests as well as the totals of the "normal" and "abnormal" outcomes.
2 variables have been introduced at different dates throughout the testing time period. These are recorded in the table after the test outcomes section, with space for counts of the number of tests as well as the number of normal/abnormal outcomes after the DoV (Date of Variable). I have got a formula to count the total number of tests carried out after the DoV however I am stuck on how to count the (ab)normal outcomes in the test ranges after the DoV.
I have tried writing a UDF for this purpose (attached in the example sheet) however the error "Sub or Function not defined" comes up and I can't figure out why.
Any ideas on why this is or suggestions on another way to achieve what I'm after??
P.S. I have highlighted the column headers where these calculations are needed in red for ease.
P.P.S. I have included 2 tests that are laid out slightly differently in the worksheet to give an example of the layouts I am working with.
Bookmarks