I have two workbooks, which is my main observation and the other that is a copy of the trim of my main workbook, which The collaborator uses the people listed on our shared list to write notes based on their contacts.
I want to copy the notes of my colleagues in an appropriate column, by checking to see people's names and IDs. the same. So, I have to make sure that notes for Mike Smith, # 12 should be copied to their line and there should not be a line for Mike Smith # 77.
My idea was to do two loops, which goes through each row of the main sheet and then for that special main sheet row, through all the note sheet rows, the names and the names of the matches Find out, and when both of them get a match, copies of notes in that row in the note sheet, the main sheet in the appropriate column.
Here's what I have:
Private sub-command button (1_Click) as slow jbBook in the workbook dim x as integer dim I set the integer jbBook = (I, 5) = jbBook.Worksheets (1). For cells (x, 5) (= C: \ ... \ Noteworkbook.xslx) = for I = 2 to 200 x = 2 to 200 Then if the cell (i, 16) = jbBook.Worksheets (1). Cell (x, 16) then cell (i, 52) = jbBook.Worksheets (1) .mail (i, 34) next x next i jbBook.Close last sub
I believe this problem was S:
if the cell (i, 5) = jbBook Worksheets (1) (X, 5) then
try to change it
if ActiveWorkbook.Cells (i, 5) = jbBook.Worksheets (1). X, 5) then
I believe that the unreferenced cell ()
is giving the error that you definitely have to change all of them.
If you can think / break on different lines, just for readability.
No comments:
Post a Comment