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



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: ★
Check out the full playlist:

★ My Online Excel Courses ★

Courses ►

✉ Subscribe & get my TOP 10 Excel formulas e-book for free

EXCEL RESOURCES I Recommend:

Get Office 365:
Microsoft Surface:

GEAR
Camera:
Screen recorder:
Microphone:
Lights:

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

Nguồn: https://kuherbal.com/

Xem thêm bài viết khác: https://kuherbal.com/category/cong-nghe

21 Comments

  1. How can I use cell reference as the Find value to another sheet so if the cell reference changes, it will find another cell based on that cell reference value. Thanks.

  2. Can you please share link for many matches video?
    Thank you for clearly explaining the function
    Much appreciated

  3. how can i search for a value in sheet 2 from a value i enter on sheet1, and then update the cells of that row with new information from sheet 1. Sheet 1 is a user form i created with vba that inputs new information one row at a time… but I cant' get sheet 1 to not put a duplicate, and instead update information of the value already there.

  4. I need code that finds the largest value that I can +1 to and use it as a NextVal – – anyone?

  5. can anyone tell me how to do a vba find that will select each highlighted cell (cell has no values), and will allow me to loop through all of them.

  6. how to do a loop until it didn't find the selected text any more ?

  7. Hi, your are beautful

  8. Dear Madam I need excel text function by VBA code

    I mean WorksheetFunction.text(12,"00000")
    Desire result =00012

    How it possible by VBA

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

  10. Very useful VBA, and very well explained, thank you so much!

  11. please how can i find the properties for a button in excel 2016 as in the one similar to the properties in the developer tab but this time referring to a button instead

  12. I'm receiving a type mismatch (Run-time error 13)? Any ideas?

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

  14. anyone know how we can find multiuple vlaues? for example a value in A1 and B1. ?

  15. How to handle the find error without defining the object. Can we do it with if function.

    E.g I have two workbooks one has 5 column while other has 4 columns… So if I am finding the column header of ist workbook and I want to keep that as a general statement; however my 2nd workbook doesn't contain that column header; how should I avoid that situation/error .And how to skip further steps that follow in line with the find code.. If I am using find function for locating the column heads..

    Here is the code that needs to be corrected

    If cells.find(what:="Name", after:= active cell).activate
    Selection.clearcontents
    Active cell.value = "New name)
    End if

  16. Hi, could you do a video for finding dates.

  17. I noticed, the 'What' parameter for the object Range was not expressed explicitly, (i.e. string or any excel type, 7.5 or "value to find") i receive an 'empty' for Set test_val = Cells.Find(what:="7.5", LookIn:=xlFormulas, lookat:=xlWhole)
    , any suggestions?

  18. I mean you are seriously great!

  19. Thank you for the fine instructional video. Could you please post link to "Many Matches" lecture video?

Leave a Reply

Your email address will not be published. Required fields are marked *