Hi everyone, I've been racking my brain and many google searches later and have been having a really hard time at this. I would really appreciate some assistance!
I've got a file that has a layout like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Product Country 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Product Country 2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Product Code 1[/TD]
[TD]Product Code 2[/TD]
[TD]Product Code 3[/TD]
[TD][/TD]
[TD]Product Code 5[/TD]
[TD]Product code 4[/TD]
[TD]Product code 1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Product Line 1[/TD]
[TD]price 1[/TD]
[TD]Price 2[/TD]
[TD]price 3[/TD]
[TD]FILLER[/TD]
[TD]Price 7[/TD]
[TD]Price 7[/TD]
[TD]price 16[/TD]
[/TR]
[TR]
[TD]Product Line 2[/TD]
[TD]Price 4[/TD]
[TD]Price 5[/TD]
[TD]Price 10[/TD]
[TD]FILLER[/TD]
[TD]Price 8[/TD]
[TD]Price 9[/TD]
[TD]price 17[/TD]
[/TR]
[TR]
[TD]Product Line 3[/TD]
[TD]price 11[/TD]
[TD]price 12[/TD]
[TD]price 15[/TD]
[TD]FILLER[/TD]
[TD]price 13[/TD]
[TD]price 14[/TD]
[TD]price 18[/TD]
[/TR]
</tbody>[/TABLE]
I am trying to extract the price from the table given an input of the country, the code, and the product line. My problem is that there can be duplicate codes and there are no other unique identifiers. I could lookup successfully if the country was present at every single column top but unfortunately its not. The country will always be either directly above the code or the first text value to the left. I'm almost positive this has to be done in VBA, but my skills are not quite there yet
Anyone have any clue how to tackle this one?
I've got a file that has a layout like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Product Country 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Product Country 2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Product Code 1[/TD]
[TD]Product Code 2[/TD]
[TD]Product Code 3[/TD]
[TD][/TD]
[TD]Product Code 5[/TD]
[TD]Product code 4[/TD]
[TD]Product code 1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Product Line 1[/TD]
[TD]price 1[/TD]
[TD]Price 2[/TD]
[TD]price 3[/TD]
[TD]FILLER[/TD]
[TD]Price 7[/TD]
[TD]Price 7[/TD]
[TD]price 16[/TD]
[/TR]
[TR]
[TD]Product Line 2[/TD]
[TD]Price 4[/TD]
[TD]Price 5[/TD]
[TD]Price 10[/TD]
[TD]FILLER[/TD]
[TD]Price 8[/TD]
[TD]Price 9[/TD]
[TD]price 17[/TD]
[/TR]
[TR]
[TD]Product Line 3[/TD]
[TD]price 11[/TD]
[TD]price 12[/TD]
[TD]price 15[/TD]
[TD]FILLER[/TD]
[TD]price 13[/TD]
[TD]price 14[/TD]
[TD]price 18[/TD]
[/TR]
</tbody>[/TABLE]
I am trying to extract the price from the table given an input of the country, the code, and the product line. My problem is that there can be duplicate codes and there are no other unique identifiers. I could lookup successfully if the country was present at every single column top but unfortunately its not. The country will always be either directly above the code or the first text value to the left. I'm almost positive this has to be done in VBA, but my skills are not quite there yet
Anyone have any clue how to tackle this one?