How to Create Vlookup Function in Excel ing VBA

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 34

  • @ashrafabdallaattyaelfeky2639
    @ashrafabdallaattyaelfeky2639 5 років тому +1

    Explain in the utmost magnificence ... Ask your presence to search in more than sheet and the result appear in the listbox by writing in the textbox ... Thank you so much for all your presentation of the explanations and codes distinct

  • @kb7417
    @kb7417 3 роки тому

    That vlookup coding part is clever part. Amazing, learnt something new.

    • @DJOamen
      @DJOamen  3 роки тому

      Glad to hear that! Thanks KB

  • @ppdbsekolah1913
    @ppdbsekolah1913 3 роки тому

    Great Teacher...

    • @DJOamen
      @DJOamen  3 роки тому

      Thank you! 😃

  • @TheComputerDocter
    @TheComputerDocter 2 роки тому

    Exactly what I needed. Thanks

    • @DJOamen
      @DJOamen  2 роки тому

      Glad it helped!

  • @officialbaryar2017
    @officialbaryar2017 5 років тому

    You are the realy best teacher.

    • @DJOamen
      @DJOamen  5 років тому

      Thank you 👍

  • @dgitson
    @dgitson 4 роки тому +1

    very nice, thanks

  • @nileshtikekar3235
    @nileshtikekar3235 4 роки тому

    Thank you sir, very helpful

  • @mexxy7902115
    @mexxy7902115 4 роки тому

    Thank sir I like your way

  • @teeranonpasutham1133
    @teeranonpasutham1133 3 роки тому

    Thank you

    • @DJOamen
      @DJOamen  3 роки тому

      You're welcome

  • @muhammad3165
    @muhammad3165 Рік тому

    what if i want to leave out one of the columns? Like i have 9 but i only want to use 7 of it

    • @DJOamen
      @DJOamen  Рік тому

      For nine columns that's (A to I), see below:
      lstDisplay.ColumnCount = 9
      lstDisplay.RowSource = "A1:I65356"

  • @khaled861991
    @khaled861991 4 роки тому

    What if I need to change a value using the form?

    • @DJOamen
      @DJOamen  4 роки тому

      The tutorial is all about Vlookup in Excel with VBA using Userform.

  • @sigitpurwanto3531
    @sigitpurwanto3531 4 роки тому

    Terimakasih ilmunya

    • @DJOamen
      @DJOamen  4 роки тому

      Terima kasih dan saya senang Anda menyukai tutorialnya, ingatlah untuk berlangganan. Semoga harimu menyenangkan

  • @omiorahman6283
    @omiorahman6283 5 років тому

    Thank you sir

  • @kuatulangan9811
    @kuatulangan9811 4 роки тому

    Sir, would you mind to explain what do you mean by dim q and p, thank you very much sir

    • @DJOamen
      @DJOamen  4 роки тому

      Variable declared e.g q and p.

    • @kuatulangan9811
      @kuatulangan9811 4 роки тому

      @@DJOamen is those variable q and p refering to some cell on worksheet? im really sorry to bother you for what im not understanding yet sir, thankyou very much for all of your video

    • @DJOamen
      @DJOamen  4 роки тому

      Declared variables are storage location, the two variables q and p are used to store values within the VBA. Read more about variable here, see link: launchschool.com/books/ruby/read/variables

    • @kuatulangan9811
      @kuatulangan9811 4 роки тому

      @@DJOamen thankyou very much sir,... really2 thankyou

  • @isira31
    @isira31 8 місяців тому

    If I enter a student ID which is not in the database, the application will crash. Any solutions for that?

    • @DJOamen
      @DJOamen  8 місяців тому +1

      Private Sub ComboBox1_Change()
      On Error GoTo ErrorHandler
      Dim q As Long
      Dim p As Long
      q = Application.WorksheetFunction.CountA(Sheet1.Range("A:A"))
      If q = 0 Then
      MsgBox "No data found in column A.", vbExclamation
      Exit Sub
      End If
      For p = 1 To 15
      Me("Textbox" & p).Value = Application.WorksheetFunction.VLookup(CLng(Me.ComboBox1.Value), _
      Sheet1.Range("A" & 2, "P" & q), p + 1, 0)
      Next p
      Exit Sub
      ErrorHandler:
      MsgBox "An error occurred: " & Err.Description, vbCritical
      End Sub

    • @isira31
      @isira31 7 місяців тому

      @@DJOamen Great ... Thank you sir