I need to compare a list in ThisWorkbook to a list in another workbook, and delete the row from the other workbook if the number in the other workbook is > the number in ThisWorkbook. I'll call ThisWorkbook Workbook A, and the other workbook Workbook B for explanation purposes. Workbook A contains my code. In Workbook A is a list of filenames in column A: examples - 35, 43, 46, 60 etc...the filename is a number. These filenames, for purposes of my loop, are Workbook B, and are saved on our network. Workbook A also has a list of numbers next to each filename in column B. B1 corresponds with A1, B2 corresponds with A2 etc. Workbook A loops through each filename, opens each file, and performs a few procedures to get the files in a workable format. When done, I'm left with a column of numbers in Workbook B. I need to loop through each cell in column F of Workbook B, and check if the number in the cell is > the corresponding number contained in column B of Workbook A for the given file in the loop.
Below is what I've been working on. As you see, I've hard-coded the number 36 into my statement, however, I can't hard-code this because this number will vary depending on which file out of 150 files the loop is working on. Any suggestions on how to go about this? If you'd like me to set up a couple sample workbooks to make it easier to understand, I can do so, please let me know. Thanks for looking!
Bookmarks