Skip to main content

How to synchronize drop-down lists in multiple worksheets in Excel?

Author Siluvia Last modified

Suppose you have drop-down lists on several worksheets in a workbook that contain exactly the same drop-down items. Now you want to synchronize the drop-down lists across worksheets so that once you select an item from a drop-down list in one worksheet, the drop-down lists in other worksheets are automatically synchronized the same selection. This article provides a VBA code to help you solve this problem.

Synchronize drop-down lists in multiple worksheets with VBA code


Synchronize drop-down lists in multiple worksheets with VBA code

For example, the drop-down lists are in five worksheets named Sheet1, Sheet2, ..., Sheet5, to synchronize the drop-down lists in other worksheets according to the drop-down selection in Sheet1, please apply the following VBA code to get it done.

1. Open Sheet1, right click the sheet tab and select View Code from the right-click menu.

A screenshot showing the right-click menu on Sheet1 to view the code in Excel

2. In the Microsoft Visual Basic for Applications window, paste the following VBA code into the Sheet1 (Code) window.

A screenshot showing the Microsoft Visual Basic for Applications window where the VBA code is pasted in Excel

VBA code: Synchronize drop-down list in multiple worksheets

Private Sub Worksheet_Change(ByVal Target As Range)
'Updated by Extendoffice 20220815
    Dim tSheet1 As Worksheet
    Dim tRange As Range
    Dim xRangeStr As String
    On Error Resume Next
    If Target.Count > 1 Then Exit Sub
    
    xRangeStr = "A2:A11"

    Set tRange = Intersect(Target, Range(xRangeStr))
    If Not tRange Is Nothing Then
        xRangeStr = tRange.Address
        Application.EnableEvents = False
        Set tSheet1 = ActiveWorkbook.Worksheets("Sheet2")
        tSheet1.Range(xRangeStr).Value = Target.Value
        Set tSheet1 = ActiveWorkbook.Worksheets("Sheet3")
        tSheet1.Range(xRangeStr).Value = Target.Value
        Set tSheet1 = ActiveWorkbook.Worksheets("Sheet4")
        tSheet1.Range(xRangeStr).Value = Target.Value
        Set tSheet1 = ActiveWorkbook.Worksheets("Sheet5")
        tSheet1.Range(xRangeStr).Value = Target.Value
        Application.EnableEvents = True
    End If
    
End Sub

Notes:

1) In the code, A2:A11 is the range containing the drop-down list. Make sure that all drop-down lists are in the same range across different worksheets.
2) Sheet2, Sheet3, Sheet4 and Sheet5 are worksheets that contain drop-down lists you want to synchronize based on the drop-down list in Sheet1;
3) To add more worksheets to the code, add the following two lines before the line “Application.EnableEvents = True”, then change the sheet name “Sheet5” to the desired name.
Set tSheet1 = ActiveWorkbook.Worksheets("Sheet5")
tSheet1.Range(xRangeStr).Value = Target.Value

3. Press the Alt + Q keys to close the Microsoft Visual Basic for Applications window.

From now on, when you select an item from the drop-down list in Sheet1, the drop-down lists in the specified worksheets will be synchronized automatically to have the same selection. See the below demo.

A GIF showing how the drop-down lists synchronize across worksheets when an item is selected in Excel


Demo: Synchronize Drop-Down Lists In Multiple Worksheets In Excel

 

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!