PDA

View Full Version : Desperately need VBA code help



jayploc
06-02-2008, 08:25 AM
Here is my problem,

I have two sheets of data, sheet 1 is a complete class roster sorted by a 7-digit ID number in cells A2:A1397. Sheet 2 is a list of students in the class who attended tutoring sessions for the class also sorted by ascending ID number in cells A2:A129.
In sheet 1, column 14, I want to have a "1" if the student attended tutoring or a "0" if they didnt.

There is once catch:
- The list of attendees (sheet2) includes some students who dropped the class and therefore arent on the large final roster (sheet 1). (which im sure created some problems in my attempted codes).



If anyone can help, I will appreciate it beyond imagination b/c Im not a pro with macros and this has been troubling me for a while.

Thanks,
Jay P

Simon Lloyd
06-02-2008, 08:38 AM
Of course we can help, but you need to upload a sample workbook!

Bob Phillips
06-02-2008, 09:28 AM
N2: =--(NOT(ISNA(MATCH(A2,Sheet2!A:A,0))))

jayploc
06-02-2008, 10:52 AM
oh ok sorry. hopefully it is attached correctly. Let me know if you need anything else.

jayploc
06-02-2008, 10:54 AM
to XLD,

I dont understand that code. What exactly do I do with that?

Bob Phillips
06-02-2008, 11:10 AM
Just put it in N2 and copy down.

Actually, looking at your data, it needs a small change

=--(NOT(ISNA(MATCH(--A2,Sheet2!A:A,0))))

jayploc
06-02-2008, 12:06 PM
Wow... awesome. Thank you so much. :bow:

Simon Lloyd
06-02-2008, 12:09 PM
jayploc, you truly are in the presence of greatness!