bobkap
Active Member
- Joined
- Nov 22, 2009
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
I have the following code in my macro:
itemnocol = Application.Match("Item#", Worksheets("Prices").Range("1:1"), 0)
banana = Application.Match("Dist Price", Worksheets("Prices").Range("1:1"), 0)
I get the correct answer for "itemnocol", but using the exact same wording, I get an "Error 2042" for "banana". I've stared at this for a very long time and I just cannot see what I am not getting the correct response for banana.
This is what makes up my top row (1:1) -
[TABLE="width: 846"]
<tbody>[TR]
[TD]Item#[/TD]
[TD]Description[/TD]
[TD]UOM[/TD]
[TD]Case Pack [/TD]
[TD]Dist Price [/TD]
[TD]MSRP[/TD]
[/TR]
</tbody>[/TABLE]
itemnocol = Application.Match("Item#", Worksheets("Prices").Range("1:1"), 0)
banana = Application.Match("Dist Price", Worksheets("Prices").Range("1:1"), 0)
I get the correct answer for "itemnocol", but using the exact same wording, I get an "Error 2042" for "banana". I've stared at this for a very long time and I just cannot see what I am not getting the correct response for banana.
This is what makes up my top row (1:1) -
[TABLE="width: 846"]
<tbody>[TR]
[TD]Item#[/TD]
[TD]Description[/TD]
[TD]UOM[/TD]
[TD]Case Pack [/TD]
[TD]Dist Price [/TD]
[TD]MSRP[/TD]
[/TR]
</tbody>[/TABLE]