VBA VLOOKUP error - expected list separator or )

mcchase

New Member
Joined
Oct 16, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
I am getting this error for the vlookup below, where ":" is highlighted. How do I fix this? Thanks

x = VLookup(valvekey, model_table!A1:C3500, 2, False)
 
All 4 under References are checked, as is MS Forms 2.0 Object Library. Everything is under General.
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
going back to your comment about vlookup being a worksheet function...I moved valvekey to a (A,1) in a new sheet, called SEARCH. Cell (B,1) has the vlookup. After doing the move, the correct price is now in (B,2). With the issues we're having, I'm going to work with this option on few more price lookups and see how long it takes to retrieve the prices. Must be faster than looping thru about 3500 rows each time
 
Upvote 0
I thought I replied, but I don't see it. You said I can't use vlookup in VBA, so I put valvekey in (A,1) of a new sheet, and put the vlookup in ((B,1). Now I get the correct price in (B,1). I just need to get it the numerical equivalent of the vlookup value so I can add it to another number.
 
Upvote 0
You said I can't use vlookup in VBA
No, that is NOT what I said. And I already explained that. You should read my replies a little more carefully.

Is there some reason to use VBA and not Excel functions?
If you are truly looking for the most efficient solution, VSTACK and FILTER functions may be the way to go.
Did you look at those links?

Now I get the correct price in (B,1). I just need to get it the numerical equivalent of the vlookup value so I can add it to another number.
This is very confusing without seeing your data. If you are still having issues with this, please show us an actual example of the data you are working with and show us exactly what you are trying to do.
Note that when using VLOOKUP or any other matching functions, the data types of the values you are matching on must be the same.
You cannot compare "numbers" to "numbers entered as text", only "number to numbers" and "text to text".
 
Upvote 0

Forum statistics

Threads
1,215,509
Messages
6,125,216
Members
449,215
Latest member
texmansru47

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