Excel VBA Basics #19 Using VLOOKUP in VBA
HTML-код
- Опубликовано: 4 окт 2024
- 📊 Free Workbooks: www.excelvbais...
🥷Join Excel Ninja Pro: www.excelvbais... Months FREE On Annual Plan Auto Applied)
🥷Excel Ninjas FB Group: www.excelvbais... (Free downloads, Trainings, Live Q&A and more)
Vlookup is pretty easy as a normal function, but is it hard in Visual Basic? No! Check it out!
Fantastic Developer Tools:
🔒 Transform Any Excel File Into A Locked EXE: www.excelvbais... (25% off with code ‘25OFF’)
🟡 Create Custom Installers: www.excelvbais...
👋 Business Inquiries, Consulting, Comments, etc: www.excelvbais...
Merry Christmas everyone. I hope God blesses you richly this upcoming year. Remember, you ARE a success!! Believe it, be it! Blessings my friends!! Dan
Oh Sorry Dan, I already found out the answer in the video you previously posted Excel VBA basics #16a, and his helps me to understand error handling for vlookup vba.Thank you so much.
Yes, Sylvia, it should work just fine. Lemme know if there are issues.
Great tip, thanks Dan. Happy Easter!
as usual Excellent video.. thanks Dan for your lessons, hope to learn lot of things by excel vba is fun
Awesome, phew. Glad you found it, didn't know if I'd be able to find it. lol thanks!
Thanks for the video!
Great help! Thank you. Does this also work if the table is in a different worksheet? Thank you.
9:26 When your morning is hell, just go to taco bell
+cd412 haha!
Awesome! Thanks nareshobula! Dan
Hi Dan, good evening. Thank you so much for your helpful vlookup video. If you have chance, appreciate if you could post video for error handling for vlookup vba.thanks.
Great video Dan. I love how you make the range dynamic. What's curios to me is that when I do that the named range doesn't show up anywhere. For instance if I select F5 for go to, my named range isn't there. Any way to get it to show up?
I, thanks for your videos, really useful
One question:
naming a range base in the entire column (example - A:C) slows down macro's?
Carlos, no that shouldn't slow anything down. However, if a vlookup or something is to be performed on many, many rows, it may take slightly longer than with very few rows. Short answer, though, is no - should be fine.
Dan
Range name can I use only one instead one by one
Great Video!
I am looking to create a macro similar to this. The only difference is i want the reference table to come from another excel file.
Do you have a video that addresses this, or can point me in the right direction, code wise?
i'm looking for the same thing!
Hi Dan,
Must say I love and basically live by you video's. But there are some problems that I don't seem to find answers to, if there is any why that I can e-mail you my problem, I'm sure a lot of people can also benefit from it. If you don't have a problem to help can I ask is there a way that I can look up the status of a "booking" depending on two combobox selections ? Between Two dates.
Thanks for the video. I have it working, however is there a way to run the vlookup result automatically. As in without bring up and marco window and click run.
Of course I can make a textbox and on textbox_change() .... run vlookup, but I would like to avoid the textbox or activeXcontrols. Thank you.
Hi Dan grate video , after looking up a product like "Buffalo Meat" I want to replace it in the database as "Buffalo Meat Per LB" in VBA can you help
+John Lamela Hi John, this should work:
For x = 2 to LastRow
If cells(x,1) = "Buffalo Meat" then
cells(x,1) = cells(x,1) & " Per LB" 'adds whatever it's own value is plus " Per LB"
End If
Next x
When defineing table i got a type error for this formula =offset(FSC_Dim!$A$1,1,0,counta(FSC_Dim!$A:$A)-1,6)
unsure, when i pasted that it didn't work, but when i recreated the named range it worked. side by side they're identical. weird!
i solved it, the problem was because of windows 7 regional settings.It worked with ";" instead of ","
oic. Great work!
How do I run Vlookup inside of a Do while Loop?
hi may I have the code
Hi Dan. Thanks for the video. On trying the same process I get an error 1004 saying "Unable to get the vlookup property of the worksheet function class". I dont think i have done anything different from the steps you have given. Any idea how I can fix it?
Thanks a lot!
There are a few ways a vlookup could go wrong in vba, can you send me your wb? Excebvbaisfun@gmail.com
Dan
ExcelVbaIsFun Thanks Dan. I have mailed you my worksheet on excelvbaisfun@gmail.com
Hello i have a small question , why dont we just choose the rane as =db!$D:$D and thats it ?why do we have to write all this
Hi Samar,
Using a specific dynamic range would should have a payoff in speed, since it doesn't have to look at a million blank cells potentially. Dynamic ranges are really useful for populating listboxes or comboboxes without having to redefine the bounds frequently. www.mrexcel.com/forum/excel-questions/456998-vlookup-entire-column-vs-vlookup-dynamic-named-range.html
Thanks, great question!!!
Dan
using vlookup function in vba userform , everytime that the value is wrong i always getting the vlookup property error how can i avoid it
making a vid to help with this.
ExcelVbaIsFun Hi Dan,
Sorry know you must be busy. On the vlookup in VBA is there a way to do this on a userform, depending what is selected in a combobox, should return info to 2 on more Textboxes ?
Sorry, it is really difficult to understand, i just want to know that it should go to the last row
oops I am using a user form for my lookup
too many very confuse