Add up in a Range Based on Criteria Using VBA

mayaincaztec

New member
Joined
Mar 21, 2015
Messages
1
Reaction score
0
Points
0
Hi All,

I'm having trouble with data processing for my Final-course Essay. Please download my file in order that I can explain more easily.
In the first sheet (Board_raw), there are information about Boards of Directors and Executives of listed firms in Vietnam Stock Market. It is displayed with the ticker of a firm (i.e, list name of a firm, with 3 characters) and date. I calculated whether a person is a director (1 means that person is in the Board of Directors and 0 for otherwise) in the column K in this sheet.
What I need is calculate the total member of BoDs of a specific at a specific time (sheet Board_final).
For example, at 2013 (i.e, the last day of the year 2013), ABT has 5 members of BoDs. We will calculate it by add up all the cells which have value 1, based on criteria that the date is the most closest to 31/12/2013. In this case, the date is 07/01/2014. All other cases have the same principle like this.
I tried to use SUMPRODUCT() but it has some mistake.
Anybody have some clues about this by using VBA? Thanks for your reading :)

P/S: This is my file, for your consideration:


 

Attachments

  • Board Data.xlsx
    420.9 KB · Views: 8
Back
Top