Μετάβαση στο κύριο περιεχόμενο

Πώς να συμπληρώσετε αυτόματα κατά την πληκτρολόγηση στην αναπτυσσόμενη λίστα του Excel;

Για μια αναπτυσσόμενη λίστα επικύρωσης δεδομένων με πολλά στοιχεία, πρέπει να κάνετε κύλιση προς τα πάνω και προς τα κάτω στη λίστα για να βρείτε αυτό που χρειάζεστε ή να πληκτρολογήσετε σωστά ολόκληρη τη λέξη στο πλαίσιο λίστας. Υπάρχει κάποιος τρόπος να γίνει αυτόματη συμπλήρωση της αναπτυσσόμενης λίστας όταν πληκτρολογείτε τους αντίστοιχους χαρακτήρες; Αυτό θα βοηθούσε τους ανθρώπους να εργάζονται πιο αποτελεσματικά σε φύλλα εργασίας με αναπτυσσόμενες λίστες σε κελιά. Αυτό το σεμινάριο παρέχει δύο μεθόδους για να σας βοηθήσει να το πετύχετε.

Κάντε τις αναπτυσσόμενες λίστες να συμπληρώνονται αυτόματα με κώδικα VBA
Κάντε εύκολα τις αναπτυσσόμενες λίστες αυτόματη συμπλήρωση σε 2 δευτερόλεπτα

Περισσότερα μαθήματα για την αναπτυσσόμενη λίστα ...


Κάντε τις αναπτυσσόμενες λίστες να συμπληρώνονται αυτόματα με κώδικα VBA

Κάντε τα εξής για να κάνετε αυτόματη συμπλήρωση μιας αναπτυσσόμενης λίστας αφού πληκτρολογήσετε αντίστοιχα γράμματα στο κελί.

Πρώτον, πρέπει να εισαγάγετε ένα σύνθετο πλαίσιο στο φύλλο εργασίας και να αλλάξετε τις ιδιότητές του.
  1. Ανοίξτε το φύλλο εργασίας που περιέχει τα κελιά της αναπτυσσόμενης λίστας που θέλετε να τα κάνετε αυτόματη συμπλήρωση.
  2. Πριν εισαγάγετε ένα πλαίσιο Combo, πρέπει να προσθέσετε την καρτέλα Προγραμματιστής στην κορδέλα του Excel. Εάν η καρτέλα Προγραμματιστής εμφανίζεται στην κορδέλα σας, μεταβείτε στο βήμα 3. Διαφορετικά, κάντε τα εξής για να εμφανιστεί η καρτέλα Προγραμματιστής στην κορδέλα: Κάντε κλικ Αρχεία > Επιλογές για να ανοίξετε το Επιλογές παράθυρο. Σε αυτό Επιλογές του Excel παράθυρο, κάντε κλικ στην επιλογή Προσαρμογή της Κορδέλας στο αριστερό παράθυρο, επιλέξτε το Εργολάβος πλαίσιο και, στη συνέχεια, κάντε κλικ στο OK κουμπί. Δείτε το στιγμιότυπο οθόνης:
  3. Πατήστε Εργολάβος > Κύριο θέμα > Combo Box (έλεγχος ActiveX).
  4. Σχεδιάστε ένα σύνθετο πλαίσιο στο τρέχον φύλλο εργασίας. Κάντε δεξί κλικ και μετά επιλέξτε Ιδιοκτησίες από το μενού με δεξί κλικ.
  5. Στο Ιδιοκτησίες πλαίσιο διαλόγου, αντικαταστήστε το αρχικό κείμενο στο (Όνομα) πεδίο με TempCombo.
  6. Απενεργοποιήστε το Λειτουργία σχεδίασης κάνοντας κλικ Εργολάβος > Λειτουργία σχεδίασης.
Στη συνέχεια, εφαρμόστε τον παρακάτω κωδικό VBA
  1. Κάντε δεξί κλικ στην καρτέλα τρέχον φύλλου και κάντε κλικ Προβολή κωδικού από το μενού περιβάλλοντος. Δείτε το στιγμιότυπο οθόνης:
  2. Στο άνοιγμα Microsoft Visual Basic για εφαρμογές παράθυρο, αντιγράψτε και επικολλήστε τον παρακάτω κώδικα VBA στο παράθυρο κώδικα του φύλλου εργασίας.
    Κωδικός VBA: Αυτόματη συμπλήρωση κατά την πληκτρολόγηση στην αναπτυσσόμενη λίστα
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    'Update by Extendoffice: 2020/01/16
        Dim xCombox As OLEObject
        Dim xStr As String
        Dim xWs As Worksheet
        Dim xArr
        
        Set xWs = Application.ActiveSheet
        On Error Resume Next
        Set xCombox = xWs.OLEObjects("TempCombo")
        With xCombox
            .ListFillRange = ""
            .LinkedCell = ""
            .Visible = False
        End With
        If Target.Validation.Type = 3 Then
            Target.Validation.InCellDropdown = False
            Cancel = True
            xStr = Target.Validation.Formula1
            xStr = Right(xStr, Len(xStr) - 1)
            If xStr = "" Then Exit Sub
            With xCombox
                .Visible = True
                .Left = Target.Left
                .Top = Target.Top
                .Width = Target.Width + 5
                .Height = Target.Height + 5
                .ListFillRange = xStr
                If .ListFillRange = "" Then
                    xArr = Split(xStr, ",")
                    Me.TempCombo.List = xArr
                End If
                .LinkedCell = Target.Address
            End With
            xCombox.Activate
            Me.TempCombo.DropDown
        End If
    End Sub
    Private Sub TempCombo_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
        Select Case KeyCode
            Case 9
                Application.ActiveCell.Offset(0, 1).Activate
            Case 13
                Application.ActiveCell.Offset(1, 0).Activate
        End Select
    End Sub
  3. Τύπος άλλος + Q ταυτόχρονα για να κλείσετε το Εφαρμογές της Microsoft Visual Basic παράθυρο.

Από τώρα και στο εξής, όταν κάνετε κλικ σε ένα κελί αναπτυσσόμενης λίστας, η αναπτυσσόμενη λίστα θα εμφανιστεί αυτόματα. Μπορείτε να αρχίσετε να πληκτρολογείτε το γράμμα για να συμπληρώσετε αυτόματα το αντίστοιχο στοιχείο σε επιλεγμένο κελί. Δείτε το στιγμιότυπο οθόνης:

Σημείωση: Αυτός ο κωδικός δεν λειτουργεί για συγχωνευμένα κελιά.

Κάντε εύκολα την αναπτυσσόμενη λίστα αυτόματη συμπλήρωση σε 2 δευτερόλεπτα

Για τους περισσότερους χρήστες του Excel, η παραπάνω μέθοδος VBA είναι δύσκολο να κατακτηθεί. Αλλά με το Αναπτυσσόμενη λίστα με δυνατότητα αναζήτησης χαρακτηριστικό του Kutools για Excel, μπορείτε εύκολα να ενεργοποιήσετε την αυτόματη συμπλήρωση για τις αναπτυσσόμενες λίστες επικύρωσης δεδομένων ένα καθορισμένο εύρος σε μόλις 2 δευτερόλεπτα. Επιπλέον, αυτή η δυνατότητα είναι διαθέσιμη για όλες τις εκδόσεις του Excel.

Άκρο: Πριν εφαρμόσετε αυτό το εργαλείο, εγκαταστήστε το Kutools για Excel Πρώτα. Μεταβείτε στη δωρεάν λήψη τώρα.

  1. Για να ενεργοποιήσετε την αυτόματη συμπλήρωση στις αναπτυσσόμενες λίστες σας, επιλέξτε πρώτα την περιοχή με τα αναπτυσσόμενα μενού. Στη συνέχεια, μεταβείτε στο Kutools καρτέλα, επιλέξτε Αναπτυσσόμενη λίστα > Κάντε την αναπτυσσόμενη λίστα με δυνατότητα αναζήτησης, αυτόματο αναδυόμενο παράθυρο.
  2. Στο Κάντε την αναπτυσσόμενη λίστα με δυνατότητα αναζήτησης παράθυρο διαλόγου, κάντε κλικ στο OK για να αποθηκεύσετε τη ρύθμιση.
Αποτέλεσμα

Μόλις ολοκληρωθεί η διαμόρφωση, κάνοντας κλικ σε ένα κελί της αναπτυσσόμενης λίστας εντός του καθορισμένου εύρους θα εμφανιστεί ένα πλαίσιο λίστας. Κατά την εισαγωγή χαρακτήρων, εφόσον ένα στοιχείο ταιριάζει ακριβώς, ολόκληρη η λέξη επισημαίνεται αμέσως στο πλαίσιο λίστας και μπορεί να συμπληρωθεί στο κελί της αναπτυσσόμενης λίστας απλά πατώντας το πλήκτρο Enter.


Σχετικά άρθρα:

Πώς να δημιουργήσετε αναπτυσσόμενη λίστα με πολλά πλαίσια ελέγχου στο Excel;
Πολλοί χρήστες του Excel τείνουν να δημιουργούν αναπτυσσόμενη λίστα με πολλαπλά πλαίσια ελέγχου για να επιλέγουν πολλά στοιχεία από τη λίστα ανά φορά. Στην πραγματικότητα, δεν μπορείτε να δημιουργήσετε μια λίστα με πολλά πλαίσια ελέγχου με επικύρωση δεδομένων. Σε αυτό το σεμινάριο, θα σας δείξουμε δύο μεθόδους για να δημιουργήσετε αναπτυσσόμενη λίστα με πολλά πλαίσια ελέγχου στο Excel. Αυτό το σεμινάριο παρέχει τη μέθοδο για την επίλυση του προβλήματος.

Δημιουργήστε αναπτυσσόμενη λίστα από άλλο βιβλίο εργασίας στο Excel
Είναι πολύ εύκολο να δημιουργήσετε μια αναπτυσσόμενη λίστα επικύρωσης δεδομένων μεταξύ των φύλλων εργασίας σε ένα βιβλίο εργασίας. Αλλά αν τα δεδομένα της λίστας που χρειάζεστε για την επικύρωση δεδομένων εντοπίζονται σε άλλο βιβλίο εργασίας, τι θα κάνατε; Σε αυτό το σεμινάριο, θα μάθετε πώς μπορείτε να δημιουργήσετε μια αναπτυσσόμενη λίστα από άλλο βιβλίο εργασίας στο Excel λεπτομερώς.

Δημιουργήστε μια αναπτυσσόμενη λίστα με δυνατότητα αναζήτησης στο Excel
Για μια αναπτυσσόμενη λίστα με πολλές τιμές, η εύρεση μιας κατάλληλης δεν είναι εύκολη δουλειά. Προηγουμένως έχουμε εισαγάγει μια μέθοδο αυτόματης συμπλήρωσης της αναπτυσσόμενης λίστας κατά την εισαγωγή του πρώτου γράμματος στο αναπτυσσόμενο πλαίσιο. Εκτός από τη λειτουργία αυτόματης συμπλήρωσης, μπορείτε επίσης να κάνετε αναζήτηση στην αναπτυσσόμενη λίστα για ενίσχυση της αποτελεσματικότητας λειτουργίας στην εύρεση κατάλληλων τιμών στην αναπτυσσόμενη λίστα. Για να κάνετε αναζήτηση στην αναπτυσσόμενη λίστα, δοκιμάστε τη μέθοδο σε αυτό το σεμινάριο.

Αυτόματη συμπλήρωση άλλων κελιών κατά την επιλογή τιμών στην αναπτυσσόμενη λίστα του Excel
Ας υποθέσουμε ότι έχετε δημιουργήσει μια αναπτυσσόμενη λίστα με βάση τις τιμές στην περιοχή κελιών B8: B14. Όταν επιλέγετε οποιαδήποτε τιμή στην αναπτυσσόμενη λίστα, θέλετε οι αντίστοιχες τιμές στην περιοχή κελιών C8: C14 να συμπληρώνονται αυτόματα σε ένα επιλεγμένο κελί. Για την επίλυση του προβλήματος, οι μέθοδοι σε αυτό το σεμινάριο θα σας βοηθήσουν.

Περισσότερα μαθήματα για την αναπτυσσόμενη λίστα ...

Τα καλύτερα εργαλεία παραγωγικότητας γραφείου

🤖 Kutools AI Aide: Επανάσταση στην ανάλυση δεδομένων με βάση: Ευφυής Εκτέλεση   |  Δημιουργία κώδικα  |  Δημιουργία προσαρμοσμένων τύπων  |  Αναλύστε δεδομένα και δημιουργήστε γραφήματα  |  Επίκληση Λειτουργιών Kutools...
Δημοφιλή χαρακτηριστικά: Εύρεση, επισήμανση ή αναγνώριση διπλότυπων   |  Διαγραφή κενών γραμμών   |  Συνδυάστε στήλες ή κελιά χωρίς απώλεια δεδομένων   |   Γύρος χωρίς φόρμουλα ...
Σούπερ Αναζήτηση: VLookup πολλαπλών κριτηρίων    VLookup πολλαπλών τιμών  |   VLookup σε πολλά φύλλα   |   Ασαφής αναζήτηση ....
Σύνθετη αναπτυσσόμενη λίστα: Γρήγορη δημιουργία αναπτυσσόμενης λίστας   |  Εξαρτημένη αναπτυσσόμενη λίστα   |  Πολλαπλή αναπτυσσόμενη λίστα ....
Διαχειριστής στήλης: Προσθέστε έναν συγκεκριμένο αριθμό στηλών  |  Μετακίνηση στηλών  |  Εναλλαγή κατάστασης ορατότητας κρυφών στηλών  |  Συγκρίνετε εύρη και στήλες ...
Επιλεγμένα Χαρακτηριστικά: Εστίαση πλέγματος   |  Προβολή σχεδίου   |   Μεγάλη Formula Bar    Διαχείριση βιβλίου εργασίας & φύλλου   |  Βιβλιοθήκη πόρων (Αυτόματο κείμενο)   |  Επιλογή ημερομηνίας   |  Συνδυάστε φύλλα εργασίας   |  Κρυπτογράφηση/Αποκρυπτογράφηση κελιών    Αποστολή email ανά λίστα   |  Σούπερ φίλτρο   |   Ειδικό φίλτρο (φίλτρο με έντονη γραφή/πλάγια γραφή/διαγραφή...) ...
Κορυφαία 15 σύνολα εργαλείων12 Κείμενο Εργαλεία (Προσθήκη κειμένου, Κατάργηση χαρακτήρων, ...)   |   50 + Διάγραμμα Τύποι (Gantt διάγραμμα, ...)   |   40+ Πρακτικό ΜΑΘΗΜΑΤΙΚΟΙ τυποι (Υπολογίστε την ηλικία με βάση τα γενέθλια, ...)   |   19 Εισαγωγή Εργαλεία (Εισαγωγή κωδικού QR, Εισαγωγή εικόνας από το μονοπάτι, ...)   |   12 Μετατροπή Εργαλεία (Αριθμοί σε λέξεις, Μετατροπή Συναλλάγματος, ...)   |   7 Συγχώνευση & διαχωρισμός Εργαλεία (Σύνθετες σειρές συνδυασμού, Διαίρεση κελιών, ...)   |   ... κι αλλα

Αυξήστε τις δεξιότητές σας στο Excel με τα Kutools για Excel και απολαύστε την αποτελεσματικότητα όπως ποτέ πριν. Το Kutools για Excel προσφέρει πάνω από 300 προηγμένες δυνατότητες για την ενίσχυση της παραγωγικότητας και την εξοικονόμηση χρόνου.  Κάντε κλικ εδώ για να αποκτήσετε τη δυνατότητα που χρειάζεστε περισσότερο...

Περιγραφή


Το Office Tab φέρνει τη διεπαφή με καρτέλες στο Office και κάνει την εργασία σας πολύ πιο εύκολη

  • Ενεργοποίηση επεξεργασίας και ανάγνωσης καρτελών σε Word, Excel, PowerPoint, Publisher, Access, Visio και Project.
  • Ανοίξτε και δημιουργήστε πολλά έγγραφα σε νέες καρτέλες του ίδιου παραθύρου και όχι σε νέα παράθυρα.
  • Αυξάνει την παραγωγικότητά σας κατά 50% και μειώνει εκατοντάδες κλικ του ποντικιού για εσάς κάθε μέρα!
Comments (325)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, many thanks for this material. It helped a lot.
This comment was minimized by the moderator on the site
Hello,

following on from my last comment:

I'm setting up 'standard' rows with the dropdown lists in them. These I'm wanting to copy below into an extensive spreadsheet.
Unfortunately the dropdown's don't copy down when I do that after using the VBA.
Is there a way to do whats described above?

Cheers,
Catherine
This comment was minimized by the moderator on the site
Hi Catherine,
The autocomplete drop-down lists generated by VBA code cannot be copied. You can only copy selected items that are displayed in the drop-down cell. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
Hello,

Have implemented this successfully, so thank you for this page and code.
But now I have an associated problem...:

After doing all of the above points, the code works as described, but I cannot do any undo/redo actions in the entire spreadsheet.
Is there a way to turn this combo box on for when I want to work with the dropdowns and off for when I want to work in other cells? so that the undo/redo actions are possible again?
and note, yes I have turned the design mode off after doing the above steps, but it still doesn't help the problem.

Cheers,
Catherine
This comment was minimized by the moderator on the site
Hi Catherine Foley,
If you want to use the undo operation on cells other than the drop-down cells, the following VBA code can help you. Please give it a try.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Update by Extendoffice: 2022/09/22
    Dim xCombox As OLEObject
    Dim xStr As String
    Dim xWs As Worksheet
    Dim xArr
    
    On Error Resume Next

    Set xWs = Application.ActiveSheet
    
    Set xCombox = xWs.OLEObjects("TempCombo")
    If Target.Validation.Type <> 3 Then
        If xCombox.Visible Then
            xCombox.Visible = False
        End If
        Exit Sub
    End If
    
    With xCombox
        .ListFillRange = ""
        .LinkedCell = ""
'        .Visible = False
    End With

    Target.Validation.InCellDropdown = False
    Cancel = True
    xStr = Target.Validation.Formula1
    xStr = Right(xStr, Len(xStr) - 1)
    If xStr = "" Then Exit Sub
    With xCombox
        .Visible = True
        .Left = Target.Left
        .Top = Target.Top
        .Width = Target.Width + 5
        .Height = Target.Height + 5
        .ListFillRange = xStr
        If .ListFillRange = "" Then
            xArr = Split(xStr, ",")
            Me.TempCombo.List = xArr
        End If
        .LinkedCell = Target.Address
    End With
    xCombox.Activate
    Me.TempCombo.DropDown

End Sub
Private Sub TempCombo_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    Select Case KeyCode
        Case 9
            Application.ActiveCell.Offset(0, 1).Activate
        Case 13
            Application.ActiveCell.Offset(1, 0).Activate
    End Select
End Sub
This comment was minimized by the moderator on the site
I hope now it will be upload
This comment was minimized by the moderator on the site
This code works really well for a single drop down. However, if I have 5 dropdowns using the same list of values but they need to operate independently of each other how is that accomplished? Despite my best efforts, if I put more than one combo box on the page, any selection is one is mirrored in the other.
This comment was minimized by the moderator on the site
Hi Mbuchmeier,Only need one combo box on the page. The code works on all drop-down lists in current page. You just need to manually click on the drop-down list cell to activate the combo box.
This comment was minimized by the moderator on the site
Hi crystal,
I am working with the combo box (The VBA code from 2021/11/05). It is working great and very useful but there are 2 issues:1. Issue #1: Usually when you work on any cell in Excel, there is indication on the row number which indicate which row you work about. When the combo box is opened this indication is missing2.  Issue #2: When the combo box is opened in the last column of the dynamic table, then it isn't  working as usual: when I select value from the list, the cell remain empty until I move the cursor to another cell
Attached screenshot.
Thank in advance
This comment was minimized by the moderator on the site
Hi Yoni,Thanks for your feedback. For the issues you mentioned:1. Issue #1: Excel does not highlight the row number when selecting an object in the worksheet. Since we use a combo box to replace the data validation drop-down list to handle the autocomplete operation, we can't show the indication in this case;2. Issue #2: I have tried as you described, but the problem cannot be reproduced. The screenshot you attached does not display, you need to save the screenshot and uplode it via the "Upload files" button below.
This comment was minimized by the moderator on the site
Hi Crystal,Thanks a lot for your response. Attached the screenshot. hope it will work now
This comment was minimized by the moderator on the site
Hi Yoni,Sorry for the inconvenience. The screenshot you uploaded is still not shown on the page. You need to save the screenshot on your disk in advance and then uplode it via the "Upload files" button. See the attached screenshot.
This comment was minimized by the moderator on the site
will, thank you is not enugh :::: alot of thank you then ;;;;; that worked like magic :)
This comment was minimized by the moderator on the site
Yeah, basically completely useless.  Want the cell to auto-complete when typing in a cell using list data validation.Tried this, and now I have to start over from scratch because I can't Undo it.  Thanks.Also loaded with syntax errors.
This comment was minimized by the moderator on the site
It works as it should be except for two things, first, there is no validation after insertion. i.e. if I typed anything at the combo then clicked enter it will accept the typed value while it should not do this since the data validation is being used to prevent such behaviors and make sure that the entered data is from selected range. Second, at the data validation list, sometimes I use big range with empty cells and select ignore empty at validation list but the combo takes all the range and shows it, will be nice to remove the empty cells from the combo range.
Thanks & hope you can implement these things to make it perfect.
This comment was minimized by the moderator on the site
Hi, AhmedThe VBA below helps to solve the problem of blank cells. Since the Combo box accepts the value that are not in the list, we still can't find a way to solve this problem. Sorry for the inconvenience.
<div data-tag="code">Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Update by Extendoffice: 2021/11/05
Dim xCombox As OLEObject
Dim xStr As String
Dim xWs As Worksheet
Dim xArr, xArr1
Dim xRg As Range
Dim xSrc As Variant
Dim xI, xJ, xIndex, xCount As Integer

Set xWs = Application.ActiveSheet
On Error Resume Next
Set xCombox = xWs.OLEObjects("TempCombo")
With xCombox
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
End With
If Target.Validation.Type = 3 Then
Target.Validation.InCellDropdown = False
Cancel = True
xStr = Target.Validation.Formula1
xStr = Right(xStr, Len(xStr) - 1)
If xStr = "" Then Exit Sub
Set xRg = Range(xStr)
If xRg Is Nothing Then
xArr1 = Split(xStr, ",")
Else
ReDim xArr1(0 To xRg.Count - 1)
For xI = 0 To xRg.Count - 1
xArr1(xI) = xRg.Item(xI + 1).Value
Next
End If
xI = 0
xCount = UBound(xArr1) + 1
For xJ = 0 To UBound(xArr1)
If Replace(xArr1(xJ), " ", "") = "" Then xCount = xCount - 1
Next
ReDim xArr(0 To xCount - 1)
xIndex = 0
For xJ = 0 To UBound(xArr1)
If Replace(xArr1(xJ), " ", "") <> "" Then
xArr(xIndex) = xArr1(xJ)
xIndex = xIndex + 1
End If
Next
xStr = ""
With xCombox
.Visible = True
.Left = Target.Left
.Top = Target.Top
.Width = Target.Width + 5
.Height = Target.Height + 5
.ListFillRange = xStr
If .ListFillRange = "" Then
'xArr = Split(xStr, ",")
Me.TempCombo.List = xArr
End If
.LinkedCell = Target.Address
End With
xCombox.Activate
Me.TempCombo.DropDown
End If
End Sub
Private Sub TempCombo_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Select Case KeyCode
Case 9
Application.ActiveCell.Offset(0, 1).Activate
Case 13
Application.ActiveCell.Offset(1, 0).Activate
End Select
End Sub
This comment was minimized by the moderator on the site
Hi Crystal,
I am working with the combo box (The VBA code from 2021/11/05). It is working great and so useful! thanks a lot.
I found the source of my problem. There was a line of freeze panes which override the combo box.
The only problem now is that the Undo is not working. Any idea?
Thanks in advanced,
Yoni
This comment was minimized by the moderator on the site
Hi,
The code does not support Undo. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
Thanks. Maybe do you know why Worksheet_Change event is not firing once I choose value from the combo box?
This comment was minimized by the moderator on the site
Hi, could you please doublecheck this code, when I use it instead of the dropdown list appearing, the source for the dropdown appears instead. This is the exact function I want, could you please fix it.
This comment was minimized by the moderator on the site
If you use a named range or something similar, like I have with a table column, it will display the named range name instead of the values in that named range. To get what you want, you need to change the xStr to display the worksheet range of that named range, since the .ListFillRange does not take in named ranges directly. This should accomplish it : dim RangeAddress as String: RangeAddress = Range(YourNamedRange).addressand then make the xStr something like this: xStr = "YourWorksheetNameWithTheNamedRangeInIt!" & RangeAddress (important: add the '!' for the sheet reference)
This will make your xStr look something like: NamedRangeSheet!$A$1:$A$5
xStr = Right(xStr, Len(xStr) - 1)

If .ListFillRange = "" Then
xArr = Split(xStr, ",")
Me.TempCombo.List = xArr
End If

with these adjustments your combobox should display the list values instead of the source
This comment was minimized by the moderator on the site
Hi Syu,Sorry I don't quite understand your description. Can you try to be more specific of it?After applying the VBA code mentioned in the above method, when the cell with the data validation drop-down list is checked, the drop-down list turn into a combo box, and then all the items in the list are listed. 
This comment was minimized by the moderator on the site
do you have an example file please?
This comment was minimized by the moderator on the site
Hello. The code is very cool. Please make sure that the formula "INDIRECT" is carried out and displayed. It is very necessary
This comment was minimized by the moderator on the site
The code is not working for a validation list which is created by vba code and the source is a named range
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations