Error-104 Application-defined or object-defined error on vlookup command

041418062

New Member
Joined
Feb 22, 2014
Messages
5
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
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Is it possible that the value MSS_DUMP_REFNUM is not in the first column of Worksheets("MCIQ").Range("A2:AL50000")?
 
Upvote 0
Yes, i just deleted the column and created a new one to make sure there nothing funcky with it and same issue.
 
Upvote 0
First off, Thanks Joe for your assistance.

I have corrected this issue. you did point me in the right direction. I have deleted the whole sheet and created a new one and seems like it work.
seems like it was a format issue all along.

Thanks again.
 
Upvote 0
First off, Thanks Joe for your assistance.

I have corrected this issue. you did point me in the right direction. I have deleted the whole sheet and created a new one and seems like it work.
seems like it was a format issue all along.

Thanks again.
You are welcome - glad you got it sorted.
 
Upvote 0

Forum statistics

Threads
1,223,104
Messages
6,170,125
Members
452,303
Latest member
c4cstore

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top