
Originally Posted by
onrock
if I understand your intention correctly, you want to fill the number of people who signed up for each subject for each school. The data is on Col A and Col B.
you may try the following code. Note this is a partial code which can be inserted into your main code. I didn't debug the code because I don't have your data file.
-------
for i = 2 to 22 ' or whatever the last row on your list.
data_sub = cells(i, 1).value
if data_sub = "" then
title_line = i;
goto 100
endif
for j = 5 to 14
if data_sub = cells(1, j).value then
cells(title_line, j).value = cells(i, 2).value;
endif
next j
100 continue
next i
--------------
Bookmarks