VLOOKUP() Using Macros in Excel - Worksheet Functions for VBA

Full VBA Course: www.teachexcel.com/vba-course...
How to use actual worksheet functions within your macros and VBA - this tutorial covers VLOOKUP() as well as some other basic functions and an advanced reference method that helps you build more powerful macros.
Excel File: www.teachexcel.com/excel-tuto...
Excel Forum: www.teachexcel.com/talk/micro...
This tutorial covers multiple ways to use worksheet functions from Excel within your macros and vba and it includes a number of examples that start out simple and become more advanced.
You do not need to be advanced in Exel in order to understand this tutorial, but it also shouldn't feel too simple or slow if you are already proficient in vba.
The important concepts that are covered in this tutorial include:
- How to use ranges in worksheet functions in vba.
- How to use simple functions in vba.
- How to use Vlookup in vba and macros.
- How to prevent errors with functions in vba.
Excel Courses:
- VBA/Macro Course: www.teachexcel.com/vba-course...
- Building Professional Forms: www.teachexcel.com/premium-co...
TeachExcel.com
#msexcel #howto #tutorial

Пікірлер: 22

  • @davethomas4181
    @davethomas41813 жыл бұрын

    Thank you Don. This tutorial and the many others on your site are very useful, thank you for sharing!

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Dave, you are very welcome! I am glad you find it helpful :)

  • @yuantian8719
    @yuantian87193 жыл бұрын

    hi there. In my excel, I just want to select the value for goal-seek as part of a loop. However, if i don't put MsgBox in the beginning, I shows "Compile error: Expected:=". can you please explain why?

  • @wayneedmondson1065
    @wayneedmondson10653 жыл бұрын

    Nice tip! Thanks for sharing. Thumbs up!!

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Thanks Wayne! Glad you think so :)

  • @kawtarelkasdir4069
    @kawtarelkasdir4069 Жыл бұрын

    hey there, thank u soo muuuch for this amazing explanation

  • @IvanCortinas_ES
    @IvanCortinas_ES3 жыл бұрын

    Good tutorial. Thank you for sharing it!

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Thanks Ivan! Glad you think so :)

  • @709007
    @7090073 жыл бұрын

    hi how can i define multiple values for the lookup like asci-3 &asci4

  • @jamesthomas8249
    @jamesthomas82493 жыл бұрын

    Yes, This is easier than using the range find method with a If Not found is nothing trap. VBA seems to always prefer worksheet function codes to anything I've created. Thanks

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Yea, it can definitely be annoying to spend a lot of time learning how to find values using the Find method, learn a bunch of new topics that you might not have known, and then someone tells you that you can use worksheet functions instead lol. I'm probably also guilty of this, but its hard to teach everything in a single tutorial) I'm glad you enjoyed this one!

  • @aliadel7019
    @aliadel7019 Жыл бұрын

    Hi, in case if I want to lookup for the first 3 letters how I can do this? thank you

  • @darrylmorgan
    @darrylmorgan3 жыл бұрын

    I Had Many Of Them Ugly Error Message Boxes When Learning VBA Lol.Great Tutorial...Thank You Sir :)

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Glad you like it Darryl! It is definitely annoying when you start learning and you think you understand things and then you have to learn about error handling lol

  • @jisorsemakoto9727
    @jisorsemakoto97273 жыл бұрын

    Hello may I ask if I can run multiple macros simultaneously ? If so, how?

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Hi there! It depends what you mean by simultaneously, sometimes that is not exactly what we think when it comes to running macros, and it depends what you are doing with the macros. Go ahead and ask this in our forum and include as much detail as possible about what you are trying to do and, if you can, include the macros that you are talking about and upload a sample file. Excel Forum: www.teachexcel.com/talk/microsoft-office?src=yt_comment

  • @nadermounir8228
    @nadermounir82283 жыл бұрын

    Great video. When will your VBA course be ready ?

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Nader, it is getting closer and closer, I promise! I have a date in mind but I don't want to publish the date just yet. I have finished most of the additional Utility Sections for the course now, teaching Tables, PivotTables, Sending Emails, Importing and Processing Data, Filtering/Sorting, Slicers, Timelines, Variable and Procedure management, and more and am now mostly working on getting videos edited and the course structured nicely. There are basically 3 main structures of the course that are interwoven and help with different aspects of making macros and learning to use them: - Base Topics for programming in VBA (things like IF statements, Loops, Variables, etc.) - Utility Sections that teach specific tasks related to things you can do in Excel (Searching Worksheets, working with Shapes, and more mentioned above) - Projects, which are broken up into a couple of big main projects that bring together what was learned and add in concepts related to programming and setting up larger macros and modules. Also, there is a separate project that you build throughout the entire course and after every Base Topic, you update that project with the new things that you learned, so you can immediately apply what are sometimes seemingly bland topics and can see how they work in the real-world. This is the outline and I hope this also helps to explain why it has taken more time to finish it up - the base topics have actually been complete for some time and I hope to finish up the final stages of getting this ready very soon. :)

  • @nadermounir8228

    @nadermounir8228

    3 жыл бұрын

    No worries. I like the way you explain things cuz it is always detailed and I like details a lot. I will surely enrol in the course as soon as it becomes available

  • @patrickschardt7724
    @patrickschardt77243 жыл бұрын

    I am not very familiar with VBA. How do you handle ranges changing, i.e. inserting a column or row? Right now you ranged are hard coded in

  • @Dan_De_Man

    @Dan_De_Man

    3 жыл бұрын

    Could always use named ranges which wouldnt be affected if you inserted rows or columns

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Patrick, Daz's answer is an easy way to do it, so I'd suggest that. You can also use a Table and structured references to refer to a range that will dynamically expand or contract.