The first part of macro code is to generate six tables, for patients with ADHD, anxiety, and depression. Each disease has two tables, first year, and second year. Each table includes year from 2006-2008 and 2009. Each table also includes child, adult, and senior. Svc1 has value 1. Child, svc2 has value child2. With this part, we can generate six tables. A sample table is attached. But I need to calculate the total number of patients, and the percentage to have a second table. That is what I am asking for. In reality, the table is complicated and has many rows and columns with many obs. So it is very time consuming to calculate one by one.
... View more