instanceoftime
Board Regular
- Joined
- Mar 23, 2011
- Messages
- 103
I want to create a macro and
I would like to:
be able to open an invoice, hit my macro to lookup the item numbers in column A and search a different workbook called "Final" on my desktop (C:\Users\Glen\Desktop) for the same item number in column A. When found I want to take the corresponding price in column H and place it in E of the invoice. I would like to do this for every row of the invoice.
I've found many references of the formula but not how to run down my list and fill in.
Workbook "Final" continuously changes in size
The cell H in "Final" may be blank (at which point go ahead and continue with the next item number in "invoice")
The cell A (item number) in the invoice may not be found in "Final" (at which point go ahead and continue to with next item number in "Invoice" until last )
So in english: start on "Invoice" A1, take that item number and look for it in workbook "Final" and if found take the corresponding value in "Final" H1 and place that value in "Invoice" C1
go to next item number in "Invoice" column A and continue this until last line. I have read 1000 posts but am not understanding the code enough to know if I can adapt it.
having "Final" open or closed isn't an issue (some posts didn't want to have to have the file open ... that isn't an issue here)
Please help I'm seeing vlookup code in my sleep.
I would like to:
be able to open an invoice, hit my macro to lookup the item numbers in column A and search a different workbook called "Final" on my desktop (C:\Users\Glen\Desktop) for the same item number in column A. When found I want to take the corresponding price in column H and place it in E of the invoice. I would like to do this for every row of the invoice.
I've found many references of the formula but not how to run down my list and fill in.
Workbook "Final" continuously changes in size
The cell H in "Final" may be blank (at which point go ahead and continue with the next item number in "invoice")
The cell A (item number) in the invoice may not be found in "Final" (at which point go ahead and continue to with next item number in "Invoice" until last )
So in english: start on "Invoice" A1, take that item number and look for it in workbook "Final" and if found take the corresponding value in "Final" H1 and place that value in "Invoice" C1
go to next item number in "Invoice" column A and continue this until last line. I have read 1000 posts but am not understanding the code enough to know if I can adapt it.
having "Final" open or closed isn't an issue (some posts didn't want to have to have the file open ... that isn't an issue here)
Please help I'm seeing vlookup code in my sleep.