PDA

View Full Version : VBA code to count record



abraham30
03-06-2012, 11:38 AM
Hi everybody,
I am new to the VBA. In th attached excel, I have to count the number of records based on "Serious/fatal/clinical/men, Serious/fatal/clinical/women, Serious/non-fatal/clinical/women" at line number 16, 17, 18 and then whatever record is left,
I have to count and display the records along with the term like here only(Non-Serious/fatal/clinical/women) at line number 19. I have to desing line number 18 terms such a way that whatever the term will come, separated by forward slash.
column in excel are fixed but rows are in dynamic range. After that, is it possible to keep all record as full border

Bob Phillips
03-06-2012, 06:07 PM
Try

=SUMPRODUCT(--(A7:A14="Serious"),--(B7:B14="fatal"),--(C7:C14="clinical"),--(D7:D14="men"))

and so on