Excel VBA FIND Function (& how to handle if value NOT found)

preview_player
Показать описание

Elevate your Excel skills with this in-depth tutorial on using the VBA FIND method. This guide is perfect for anyone looking to streamline their data search process in Excel using VBA.

🔍 What's Inside:
▪️ Understanding the FIND Method: Learn how to use Excel's FIND method in VBA, similar to using Ctrl+F or the Find and Select option in Excel, but much faster and more efficient.
▪️ Arguments Explained: Dive into the key arguments of the FIND method, including expression, what to find, look in, look at, and more.
▪️ Importance of Argument Settings: Understand why setting arguments like 'look in' and 'look at' is crucial, as default settings revert to your last manual find settings in Excel.
▪️ Creating a Range Object: Discover how to use the SET keyword and create a Range object to store your FIND results.
▪️ Practical Application: Apply these concepts in a real-world scenario where you find the article code for a selected company ID using a dynamic VBA code.

Quickly learn how to use the VBA FIND Function. What parameters are required. How to look for partial matches or for complete matches (whole word). Also if VBA should search in the cells, formulas or comments. I also show you how to handle cases if VBA FIND doesn't find a value. So in cases where your text or value is not found.

You'll want to account for this, because in case your text or value is not found, you'll get a VBA error. In order to avoid the error, you can use the VBA IF statement. This ensures that if a value is not found, you will not end up with an error, instead you can decide what you'd like to do (in the video I'll show you how to create a custom message box, informing the user that the value was not found).

★ Links to related videos: ★

🚩Let’s connect on social:

Note: This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!

#ExcelVBA
Рекомендации по теме
Комментарии
Автор

"If Not CompId Is Nothing Then" -- this is the content I came for. Couldn't find it anywhere else! Thank you! This is the second time I've found explanations here and nowhere else. Your presentations are very clear for newbies like myself.

andrewwolfe
Автор

Thank you for the video, your Excel VBA tutorial is one of the best VBA courses on Udemy. It's so well organized, professional and content rich which makes it absolutely enjoyable and useful for a solid career in Excel VBA programming.

surjagain
Автор

I lost interest in learning vba and excel functions but thanks to your channel here, it makes it interesting and motivating. Thanks a lot.

internet_wanderer
Автор

Not many people explain as well as you. The examples are really very good and they adapt to the labor needs. I do not know where I was looking before I had not found such a good channel. Congratulations! And Tksss 😀

nancyd.
Автор

Excellent way of avoiding an error if nothing is found.

DominicPowell
Автор

Thank you Leila, You are a really nice teacher, I like your tutorials and your way to explain everything is a really good experience to learning from you.

oscarrv
Автор

Thanks, great explanation of the IF NOT, IS NOTHING syntax. Makes sense to me now.

krn
Автор

Thanks for the VBA FIND Fun, Leila : )

excelisfun
Автор

Hi Leila, I'm new to Macros but this video, was so made so easy that I was able to make my code work.

monicakocheta
Автор

Thank you so much for your good and lean explanations

turkaykoc
Автор

thank you Ms. Leila in fact i like this so much because I'm going to use it in my new excel software thanks again.

ismailismaili
Автор

Really great tutorial, also very soothing voice. Thank you so much!!

omkarvedpathak
Автор

Elegant solutions with pleasant, informative explanations. What more could we ask for? Thanks.

michaelchoate
Автор

Thank you very much for the VBA FIND Function usage, Leila : ) it was awesome it saved me lot of time in retrieving the data Hats off to you

siddarajm
Автор

Awesome tutorial!
I could avoid a nested for loop reducing runtime greatly thanks to your tutorial.
Thank you!

ashrafgharsan
Автор

Thank you for helping clarify some syntax for me!

adamloepker
Автор

Can you explain how to apply the same on excel table (listobjects). Thanks

ForcaMessidona
Автор

Wow.. Wow... Thank you so much Leila...!! As you promised you did it.. Thanks for considering my request to make videos on VBA. Thank you we expect more from you...!!!

jamesjujare
Автор

Hello Leila, Kudos to you and your knowledge about excel. The way you have explained this video is what I was looking for. Was expecting something from MS to do :)
I was also wondering, if you can share the link on how you calculated many matches in this example ? Thanks in advance!

Saurabh-ixbx
Автор

Hi Leila ,
Thank for sharing the tutorial, it is very helpful to everyone , need your help, can you please share the tutorial of INDEX and Match function in VBA using one sheet 1 to sheet 2 .

maddymaddy