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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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