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...

Комментарии • 39

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  10 лет назад +3

    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

  • @aircooledcondenser9645
    @aircooledcondenser9645 11 лет назад

    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.

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 лет назад

    Yes, Sylvia, it should work just fine. Lemme know if there are issues.

  • @krn14242
    @krn14242 11 лет назад

    Great tip, thanks Dan. Happy Easter!

  • @nareshobula187
    @nareshobula187 11 лет назад

    as usual Excellent video.. thanks Dan for your lessons, hope to learn lot of things by excel vba is fun

  • @danstrong5354
    @danstrong5354 11 лет назад

    Awesome, phew. Glad you found it, didn't know if I'd be able to find it. lol thanks!

  • @excelisfun
    @excelisfun 11 лет назад

    Thanks for the video!

  • @sylviabaharet5192
    @sylviabaharet5192 11 лет назад +2

    Great help! Thank you. Does this also work if the table is in a different worksheet? Thank you.

  • @cd-ux9ot
    @cd-ux9ot 7 лет назад +3

    9:26 When your morning is hell, just go to taco bell

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 лет назад

    Awesome! Thanks nareshobula! Dan

  • @aircooledcondenser9645
    @aircooledcondenser9645 11 лет назад

    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.

  • @sheridiane5393
    @sheridiane5393 8 лет назад

    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?

  • @CarlosPinheiro
    @CarlosPinheiro 10 лет назад

    I, thanks for your videos, really useful
    One question:
    naming a range base in the entire column (example - A:C) slows down macro's?

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  10 лет назад

      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

  • @PeggywongPeggy
    @PeggywongPeggy 4 года назад

    Range name can I use only one instead one by one

  • @by28
    @by28 10 лет назад

    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?

    • @hoven130
      @hoven130 7 лет назад

      i'm looking for the same thing!

  • @hanneshuman5399
    @hanneshuman5399 10 лет назад

    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.

  • @ronaldtam4353
    @ronaldtam4353 10 лет назад

    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.

  • @johnlamela7656
    @johnlamela7656 8 лет назад +1

    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

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  8 лет назад

      +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

  • @muielatotiutubu
    @muielatotiutubu 10 лет назад +1

    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)

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  10 лет назад

      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!

    • @muielatotiutubu
      @muielatotiutubu 10 лет назад

      i solved it, the problem was because of windows 7 regional settings.It worked with ";" instead of ","

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  10 лет назад

      oic. Great work!

  • @robertloera5188
    @robertloera5188 11 лет назад

    How do I run Vlookup inside of a Do while Loop?

  • @PeggywongPeggy
    @PeggywongPeggy 4 года назад

    hi may I have the code

  • @indiachic84
    @indiachic84 10 лет назад

    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!

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  10 лет назад

      There are a few ways a vlookup could go wrong in vba, can you send me your wb? Excebvbaisfun@gmail.com
      Dan

    • @indiachic84
      @indiachic84 10 лет назад

      ExcelVbaIsFun Thanks Dan. I have mailed you my worksheet on excelvbaisfun@gmail.com

  • @samaralaa5591
    @samaralaa5591 6 лет назад

    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

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  6 лет назад

      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

  • @ronnelgutierrez4029
    @ronnelgutierrez4029 10 лет назад

    using vlookup function in vba userform , everytime that the value is wrong i always getting the vlookup property error how can i avoid it

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  10 лет назад

      making a vid to help with this.

    • @hanneshuman5399
      @hanneshuman5399 10 лет назад

      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 ?

  • @ashishgoyal4166
    @ashishgoyal4166 8 лет назад

    Sorry, it is really difficult to understand, i just want to know that it should go to the last row

  • @johnlamela7656
    @johnlamela7656 8 лет назад

    oops I am using a user form for my lookup

  • @PeggywongPeggy
    @PeggywongPeggy 4 года назад

    too many very confuse