View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
porter444 porter444 is offline
external usenet poster
 
Posts: 73
Default VBA Question - Delete set if any member meets criteria

I have a worksheet that contains student enrollment information in courses
and in some cases the same student has multiple items listed for the same
course.

The logic is as follows:

IF the student ID AND the course ID are the same the are considered a SET.
IF any member of the SET has a status = Completed, DELETE the SET.

Here is an example of the "before" data: (comma seperated)

Student ID,Course ID,Status
1,QUA100,Completed
1,QUA100,Enrolled
1,QUA100,No Show
1,QUA100,No Show
1,AO100,Enrolled
1,AO100,No Show
1,AO100,No Show
2,QUA100,Completed
3,QUA100,Enrolled
3,QUA100,No Show

Here is an example of the "after" data: (comma seperated)

Student ID,Course ID,Status
1,AO100,Enrolled
1,AO100,No Show
1,AO100,No Show
3,QUA100,Enrolled
3,QUA100,No Show

Thanks in advance!

Scott