-1

This is making a compile error. I believe I am not pointing to the Tab that contains my 'table_array'.

This is the formula without values, Table_Array
This is the formula without values, Table_Array

The highlighted section I believe I am doing wrong, my tab is called 'CATMAP'
The highlighted section I believe I am doing wrong, my tab is called 'CATMAP'

Community
  • 1
  • 1
  • 2
    Please add your code formatted as code block. [An image of your code is not helpful](http://idownvotedbecau.se/imageofcode). – Pᴇʜ Oct 15 '18 at 08:57

1 Answers1

1

The issue is that Worksheets(CATMAP),Column."A:B" is no valid syntax.

Instead use …

  • Worksheets(CATMAP).Range("A:B") if CATMAP is a variable.
  • or Worksheets("CATMAP").Range("A:B") if CATMAP is the name of your worksheet.

Also the way you use L2 means that L2 is a variable name. If you want to use the value of cell L2 than it must be something like Worksheets("CATMAP").Range("L2").

Additionally I recommend to read How to avoid using Select in Excel VBA. Not using .Select at all is a very good practice and prevents many errors.

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
  • Thanks Answered in the next post, still need some help though! – CaptainMacro Oct 15 '18 at 10:22
  • The error occurs if the value you look for isn't found. Have a look here [How to error handle 1004 Error with WorksheetFunction.VLookup?](https://stackoverflow.com/a/18063579/3219613) – Pᴇʜ Oct 15 '18 at 11:20