So I made a custom vlookup UDF for a table that I use extremely often to cut down on my typing....
<font face=Courier New><br><SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Function</SPAN> vname(sku <SPAN style="color:#00007F">As</SPAN> Range, sheet <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>, indexer <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>)<br><br>vname = Application.WorksheetFunction.VLookup(sku, Sheets(sheet).Range("$b$2:$ac$12000"), indexer, <SPAN style="color:#00007F">False</SPAN>)<br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN></FONT>
I put this into personal.xlsb, but I get a name error when I try to use it, and it doesn't pop up as an autocomplete when I start typing "vname".
I have verified that it works in the workbook I originally used it for.
Any ideas?
<font face=Courier New><br><SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Function</SPAN> vname(sku <SPAN style="color:#00007F">As</SPAN> Range, sheet <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>, indexer <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>)<br><br>vname = Application.WorksheetFunction.VLookup(sku, Sheets(sheet).Range("$b$2:$ac$12000"), indexer, <SPAN style="color:#00007F">False</SPAN>)<br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN></FONT>
I put this into personal.xlsb, but I get a name error when I try to use it, and it doesn't pop up as an autocomplete when I start typing "vname".
I have verified that it works in the workbook I originally used it for.
Any ideas?
Last edited: