Hello all,
I'm trying to write up a macro for excel to streamline some things I
have to do regularly, but this one is giving me a bit of trouble. I
don't think it is too complicated, I could probably do it in C++
easily, but VBA is always iffy with me. Luckily, with some help from others, I got most of it written but I am having a small problem still.
First some background:
I have two workbooks, each with 1 sheet in them.
'WorkbookA.xls|Sheet1' is more or less static list but it may have
additional entries from month to month (think of it as a 'flag it'
list). It essentially contains information about things. The names are
all in column A (lets say down to 100 for simplicity's sake). The
locations are in column B.
'WorkbookB.xls|Sheet1' has a rather large list of transactions which![]()
Please Login or Register to view this content.
get assigned an ID in column A by a macro we already have in place. The
names are in column C. The locations are in column D
However, Workbook B does not account for any of the 'flagged' items in![]()
Please Login or Register to view this content.
workbook A. In the above Workbook B example, rows 2,3,4, and 6 should be flagged.
So I need this macro to take the data from column A in the
first workbook, and run it through Workbook B (column C). If it were to
find a match, it should change Workbook B (Column A) to another ID value (lets say
5000).
For simplicity, only name matching was done at first, here is the code thus far:
I get errors on the following line:![]()
Please Login or Register to view this content.
cell.offset(0,-2).Value = 5000
Any ideas?
Thanks for your help.
Bookmarks