Run-time error '1004' Unable to get the Vlookup property of the WorksheetFunction class

lYoung

New Member
Joined
Mar 1, 2020
Messages
35
Office Version
  1. 365
Platform
  1. Windows
I'm stumped. I added a new account code to my account code list. The macro runs fine until it hits the new account code "10456060" with the error Run-time error '1004' Unable to get the Vlookup property of the WorksheetFunction class. I thought the format may be different so I copied the format from the account above it and still it is getting stuck on the new code. The new code was added to the middle of the list, not the beginning or end.

1702923765423.png


This is where the macro is getting stuck and throwing the error
1702923860203.png



This is an old macro, written in June 2022 and no issues. We've had other new account codes added to the list without issue.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
If you try that VLOOKUP manually on the worksheet, does it work with that GL code?
 
Upvote 0
What is wrong with this number "10456060"? I get #N/A. I see nothing wrong with the number.
 
Upvote 0
What is wrong with this number "10456060"? I get #N/A. I see nothing wrong with the number.
That would suggest either the number is somehow formatted differently from the lookup cell to the lookup column, or it's not present in the lookup column.
 
Upvote 0
That took care of it. I copied the number from the original report into my account list and ran it again, it worked. Thank you!
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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