Hi,
I am still fairly new to VBA and have another question. I have a very repetitive code and am wondering if there is a way to make it cleaner by creating a variable or array or something. Here is my dilemmna:
I have about 10 names. Each person has a macro assigned to them that filters a database by their name. I need to calculate functions for each particular person to see how they are performing. I have several functions I need to perform for each person. (The functions are all SUM, COUNTIF, and SUBTOTAL functions that pull info from another spreadsheet) To perform my code, I run each person's macro, then call the particular function. Its very repetitive so I wonder if there is a way to shrink it down.
I have posted my code below. You can very clearly see the pattern. Imagine there are about 30 functions. Is there a way I don't have to type in each person's name like a hundred times? Especially if I want to add/delete 1 person in the future, editing the code becomes cumbersome. Thank you so much for your help!
![]()
Please Login or Register to view this content.
Bookmarks