Good day
I get the error - 104 when attempting a Vlookup. I'm using the same formula is pervious code and works.
I have 3 sheets (MSS DUMP, ALI DUMP, MCIQ), i have made sure that the VLOOKup is pointing correctly.
I also attempted to put a value like "343434343" instead of "MSS_DUMP_REFNUM" and works. but varible (MSS_DUMP_REFNUM) will be always be chaging, so it doesnt help it being a stale value.
a simple of code that would beretured from the Vlookup would be "4500053036", i even changes the type of varible from String to LONG and same issue.
//CODE//
Dim MSS_DUMP_REFNUM, ALI_DUMP_ESRD, MCIQ_REFNUM as String
On Error Resume Next
' what WORKS, goes into sheet "ALI DUMP" and searches for whats in "MSS_DUMP_REFNUM", if found store value in ALI_DUMP_ESRD
ALI_DUMP_ESRD = Application.WorksheetFunction.VLookup(MSS_DUMP_REFNUM, Worksheets("ALI Dump").Range("A2:L50000"), 3, False)
//some if statments//
...
...if ALI_DUMP_ESRD is NULL to input N/A...etc etc
//some if statments//
""DOES NOT WORK"
MCIQ_REFNUM = Application.WorksheetFunction.VLookup(MSS_DUMP_REFNUM, Worksheets("MCIQ").Range("A2:AL50000"), 1, False)
Thanks in advance
I get the error - 104 when attempting a Vlookup. I'm using the same formula is pervious code and works.
I have 3 sheets (MSS DUMP, ALI DUMP, MCIQ), i have made sure that the VLOOKup is pointing correctly.
I also attempted to put a value like "343434343" instead of "MSS_DUMP_REFNUM" and works. but varible (MSS_DUMP_REFNUM) will be always be chaging, so it doesnt help it being a stale value.
a simple of code that would beretured from the Vlookup would be "4500053036", i even changes the type of varible from String to LONG and same issue.
//CODE//
Dim MSS_DUMP_REFNUM, ALI_DUMP_ESRD, MCIQ_REFNUM as String
On Error Resume Next
' what WORKS, goes into sheet "ALI DUMP" and searches for whats in "MSS_DUMP_REFNUM", if found store value in ALI_DUMP_ESRD
ALI_DUMP_ESRD = Application.WorksheetFunction.VLookup(MSS_DUMP_REFNUM, Worksheets("ALI Dump").Range("A2:L50000"), 3, False)
//some if statments//
...
...if ALI_DUMP_ESRD is NULL to input N/A...etc etc
//some if statments//
""DOES NOT WORK"
MCIQ_REFNUM = Application.WorksheetFunction.VLookup(MSS_DUMP_REFNUM, Worksheets("MCIQ").Range("A2:AL50000"), 1, False)
Thanks in advance
Last edited: