How to Print All Options in drop-down List

This post will guide you how to print all options in a drop down menu list in a worksheet. How do I print all options in a drop down menu into separate printout in excel. How to print all options in a drop down menu with VBA code in excel.

For example, there is a spreadsheet that give you profit for each of 20 branch companies depending which one you pick from a drop down menu. And what you want to do is that how to print all these 20 branches from the drop down menu list without manually picking each item and printing.

1. Print All Options in drop-down List

To print all options in a drop down menu list in a worksheet into separate printout, just do the following steps:

#1 open your excel workbook and then click on “Visual Basic” command under DEVELOPER Tab, or just press “ALT+F11” shortcut.

Get the position of the nth using excel vba1

#2 then the “Visual Basic Editor” window will appear.

#3 click “Insert” ->”Module” to create a new module

convert column number to letter3

#4 paste the below VBA code into the code window. Then clicking “Save” button.

print all options1
Sub printAllOptions()
    Dim dvCell As Range
    Dim inputRange As Range
    Dim c As Range
    'Which cell has data validation
    Set dvCell = Worksheets("Sheet2").Range("B1")

    'Determine where validation comes from
    Set inputRange = Evaluate(dvCell.Validation.Formula1)

    For Each c In inputRange
        dvCell = c.Value
        ActiveSheet.PrintOut
        'add some print page code here
    Next c
End Sub

#5 back to the current worksheet, then run the above excel macro. Click Run button.

print all options2

By following these steps, you can use VBA code to print all options from a dropdown list in Excel. This method is particularly useful for documenting or saving the list for reference.

2. Video: Print All Options in drop-down List

This video tutorial where we’ll unveil the art of printing all options from a dropdown list. In this video, we’ll explore a method that employs VBA code to accomplish this task in Excel.

3. SAMPLE FIlES

Below are sample files in Microsoft Excel that you can download for reference if you wish.

Leave a Reply