+ Reply to Thread
Results 1 to 15 of 15

VBA for Form combobox and match formula

  1. #1
    Forum Contributor
    Join Date
    02-27-2015
    Location
    Norge
    MS-Off Ver
    2019
    Posts
    570

    VBA for Form combobox and match formula

    Hello

    I have problem with zoom in combobox i also look at this thread "Combobox size and list within keep shrinking"

    I did see i can use a form Combobox instead of Active- X, but i can not get this code to work =INDEX(Data!B$3:B$144,MATCH($B5,Data!$A$3:$A$144,0))

    Must i use a vba to do this code maybe, i have searced and can not finf any solutions, with a Active -X i get this problem

    It seems like form Combobox list wrong and i dont know how to do
    Last edited by dodde; 02-10-2020 at 01:54 PM.

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: VBA for Form combobox and match formula

    Check yellow banner at the top of page. Attached samples file.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    02-27-2015
    Location
    Norge
    MS-Off Ver
    2019
    Posts
    570

    Re: VBA for Form combobox and match formula

    Hello

    Ok sorry, but here it is
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: VBA for Form combobox and match formula

    In C3 dragged across
    =INDEX(Data!B$3:B$82,$B3)

  5. #5
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: VBA for Form combobox and match formula

    What if you change:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    into
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Capture.JPG

  6. #6
    Forum Contributor
    Join Date
    02-27-2015
    Location
    Norge
    MS-Off Ver
    2019
    Posts
    570

    Re: VBA for Form combobox and match formula

    Hello

    Yes i done that and the qurtain works but it can not export in to the rest . you see B3 comes up with number 5, becouse it numer 5 in list

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: VBA for Form combobox and match formula

    What do you mean by "but it can not export in to the rest"?

  8. #8
    Forum Contributor
    Join Date
    02-27-2015
    Location
    Norge
    MS-Off Ver
    2019
    Posts
    570

    Re: VBA for Form combobox and match formula

    Hello

    Sorry but i explain stupid, but this form combobox give number in B3 not value from box, it seems like it count line number from where the list is, is HUP 30 / 2.5 on line 6 it give number 6 in B3

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: VBA for Form combobox and match formula

    That's exactly what it does do, & as long as the Index range is the same as the range for the combo, the suggested formulas work.
    So I don't understand your problem.

  10. #10
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: VBA for Form combobox and match formula

    That's why you don't have to identyfing correct row by MATCH in formula because you've got it already in B3.

  11. #11
    Forum Contributor
    Join Date
    02-27-2015
    Location
    Norge
    MS-Off Ver
    2019
    Posts
    570

    Re: VBA for Form combobox and match formula

    Hello

    Here i am sure doing some stupid but here is picture and workbook
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by dodde; 02-10-2020 at 01:27 PM.

  12. #12
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: VBA for Form combobox and match formula

    In attached file formula in C3 is still:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Did we've said to change it into:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ?

  13. #13
    Forum Contributor
    Join Date
    02-27-2015
    Location
    Norge
    MS-Off Ver
    2019
    Posts
    570

    Re: VBA for Form combobox and match formula

    Hello

    strange i upload a new now, with the formula as you said, you see even on picture it is right fromula, maybe som other stange ting i have done

  14. #14
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: VBA for Form combobox and match formula

    Give the attached a try.
    There are no formula on the sheet.
    The comboboxes are ActiveX
    I have placed your data in Table format, makes it easier to load combos.
    There is a routine in Module to keep ActiveX controls aligned on the worksheet.
    As you add comboboxes and expand the app run the macro "SetControls" before saving.
    To see this work move one of the comboboxes out of position then tab to 'Data' sheet and back to 'EMVC', the combo should move to its original anchor position.
    The VBA is basic and easy to follow, no complicated statements.
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    02-27-2015
    Location
    Norge
    MS-Off Ver
    2019
    Posts
    570

    Re: VBA for Form combobox and match formula

    Hello

    Case solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] User form combobox to fill another combobox
    By Quicksnot in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 04-06-2018, 04:13 PM
  2. Combobox from one form filters another combobox in another form
    By Arvin.Amaro in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2015, 02:56 PM
  3. Replies: 1
    Last Post: 11-07-2014, 01:21 PM
  4. Userform Combobox to populate form: Can I change the order of the columns in the combobox?
    By CraigWiggins in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2014, 12:14 PM
  5. update a Combobox in a Subform from a Combobox in the parent Form
    By danieldowds in forum Access Tables & Databases
    Replies: 2
    Last Post: 04-25-2014, 10:27 AM
  6. Transfer User form data to a worksheet w.r.t. combobox item on the form
    By nm766 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2011, 12:43 PM
  7. transferring combobox value from one user form to populate combobox on another
    By smartphreak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-05-2010, 10:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1