DrParmeJohnson
New Member
- Joined
- Feb 28, 2019
- Messages
- 44
Hello,
I have tried to get this question answered before but to no avail, so I am trying again.
I have been struggling to make a macro that will simplify my workload.
Simply put, the macro works between two workbooks, one that is opened in XLSTART and the actual book that is being worked on. The always open book is called "ASIN to LD.xlsx" and the other book is not always the same so it is dynamically named through the macro to make matters easy. The macro also only has to work on one sheet on each book (both called Sheet1.
ActiveWorkbook
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]*ASIN*[/TD]
[TD]ASIN[/TD]
[TD]Item#[/TD]
[TD]Title[/TD]
[/TR]
[TR]
[TD]*Barcoded ASIN*[/TD]
[TD]B006XXXXXX[/TD]
[TD][/TD]
[TD]Product name[/TD]
[/TR]
[TR]
[TD]VVVVVVVVVVVVV[/TD]
[TD]B007XXXXXX[/TD]
[TD][/TD]
[TD]VVVVVVV[/TD]
[/TR]
</tbody>[/TABLE]
ASIN to LD.xlsx
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]ASIN[/TD]
[TD]Item#[/TD]
[/TR]
[TR]
[TD]B006XXXXXX[/TD]
[TD]4500[/TD]
[/TR]
[TR]
[TD]B007XXXXXX[/TD]
[TD]4600[/TD]
[/TR]
</tbody>[/TABLE]
This is how each file looks respectively. The tricky part is that while the ASIN to LD.xlsx file always has its columns in the same ranges "A:A" & "B:B", the other workbooks are not always the same and the ASIN column can be in different columns.
So, what I need help with is figuring out how to take a value from ActiveWorkbook (say B006XXXXXX), use that value to find its matching self on ASIN to LD.xlsx, then copy the Item# beside it, in this case 4500, paste that back onto the ActiveWorkbook in the same column (Item#) and then loop through each cell (of which the length of the column will not always be the same) until it runs out of cells in the ASIN column of ActiveWorkbook.
I know this is a long post and an extensive request (at least it seems to be to me) but, I have been at this for more hours than I wanted to be and would really appreciate some assistance, as I'm losing my mind over this.
If anymore information is necessary, please ask.
Thank you greatly.
I have tried to get this question answered before but to no avail, so I am trying again.
I have been struggling to make a macro that will simplify my workload.
Simply put, the macro works between two workbooks, one that is opened in XLSTART and the actual book that is being worked on. The always open book is called "ASIN to LD.xlsx" and the other book is not always the same so it is dynamically named through the macro to make matters easy. The macro also only has to work on one sheet on each book (both called Sheet1.
ActiveWorkbook
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]*ASIN*[/TD]
[TD]ASIN[/TD]
[TD]Item#[/TD]
[TD]Title[/TD]
[/TR]
[TR]
[TD]*Barcoded ASIN*[/TD]
[TD]B006XXXXXX[/TD]
[TD][/TD]
[TD]Product name[/TD]
[/TR]
[TR]
[TD]VVVVVVVVVVVVV[/TD]
[TD]B007XXXXXX[/TD]
[TD][/TD]
[TD]VVVVVVV[/TD]
[/TR]
</tbody>[/TABLE]
ASIN to LD.xlsx
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]ASIN[/TD]
[TD]Item#[/TD]
[/TR]
[TR]
[TD]B006XXXXXX[/TD]
[TD]4500[/TD]
[/TR]
[TR]
[TD]B007XXXXXX[/TD]
[TD]4600[/TD]
[/TR]
</tbody>[/TABLE]
This is how each file looks respectively. The tricky part is that while the ASIN to LD.xlsx file always has its columns in the same ranges "A:A" & "B:B", the other workbooks are not always the same and the ASIN column can be in different columns.
So, what I need help with is figuring out how to take a value from ActiveWorkbook (say B006XXXXXX), use that value to find its matching self on ASIN to LD.xlsx, then copy the Item# beside it, in this case 4500, paste that back onto the ActiveWorkbook in the same column (Item#) and then loop through each cell (of which the length of the column will not always be the same) until it runs out of cells in the ASIN column of ActiveWorkbook.
I know this is a long post and an extensive request (at least it seems to be to me) but, I have been at this for more hours than I wanted to be and would really appreciate some assistance, as I'm losing my mind over this.
If anymore information is necessary, please ask.
Thank you greatly.
Last edited: