+ Reply to Thread
Results 1 to 3 of 3

Copy A Drop-down Menu Box

  1. #1
    Registered User
    Join Date
    10-09-2005
    Posts
    7

    Copy A Drop-down Menu Box

    Hoping I have the right name, but sometimes in an Excel file there is a cell with a drop-down menu. One clicks the small pointer on the right, and many cells of data drop down. You select the one you want. The most common form of this is when you are enroling online for something, and you are asked for your country. You click the rhs of the cell and all the world's countries are there.

    I would like to copy and paste this, but, when I do, I want ALL the world's countries to be listed, one-by-one in seperate Excel cells of their own, not all in a drop-down menu.

    Is this possible?

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    I found this list on

    http://www.comriesoftware.net/codewi...ct.aspx?key=46

    Taking away the HTML tags you get

    AFGHANISTAN
    ALBANIA
    ALGERIA
    AMERICAN SAMOA
    ANDORRA
    ANGOLA
    ANGUILLA
    ANTARCTICA
    ANTIGUA AND BARBUDA
    ARGENTINA
    ARMENIA
    ARUBA
    AUSTRALIA
    AUSTRIA
    AZERBAIJAN
    BAHAMAS
    BAHRAIN
    BANGLADESH
    BARBADOS
    BELARUS
    BELGIUM
    BELIZE
    BENIN
    BERMUDA
    BHUTAN
    BOLIVIA
    BOSNIA AND HERZEGOWINA
    BOTSWANA
    BOUVET ISLAND
    BRAZIL
    BRITISH INDIAN OCEAN TERRITORY
    BRUNEI DARUSSALAM
    BULGARIA
    BURKINA FASO
    BURUNDI
    CAMBODIA
    CAMEROON
    CANADA
    CAPE VERDE
    CAYMAN ISLANDS
    CENTRAL AFRICAN REPUBLIC
    CHAD
    CHILE
    CHINA
    CHRISTMAS ISLAND
    COCOS (KEELING) ISLANDS
    COLOMBIA
    COMOROS
    CONGO
    CONGO, THE DEMOCRATIC REPUBLIC OF THE
    COOK ISLANDS
    COSTA RICA
    COTE D'IVOIRE
    CROATIA (local name: Hrvatska)
    CUBA
    CYPRUS
    CZECH REPUBLIC
    DENMARK
    DJIBOUTI
    DOMINICA
    DOMINICAN REPUBLIC
    EAST TIMOR
    ECUADOR
    EGYPT
    EL SALVADOR
    EQUATORIAL GUINEA
    ERITREA
    ESTONIA
    ETHIOPIA
    FALKLAND ISLANDS (MALVINAS)
    FAROE ISLANDS
    FIJI
    FINLAND
    FRANCE
    FRANCE, METROPOLITAN
    FRENCH GUIANA
    FRENCH POLYNESIA
    FRENCH SOUTHERN TERRITORIES
    GABON
    GAMBIA
    GEORGIA
    GERMANY
    GHANA
    GIBRALTAR
    GREECE
    GREENLAND
    GRENADA
    GUADELOUPE
    GUAM
    GUATEMALA
    GUINEA
    GUINEA-BISSAU
    GUYANA
    HAITI
    HEARD AND MC DONALD ISLANDS
    HOLY SEE (VATICAN CITY STATE)
    HONDURAS
    HONG KONG
    HUNGARY
    ICELAND
    INDIA
    INDONESIA
    IRAN (ISLAMIC REPUBLIC OF)
    IRAQ
    IRELAND
    ISRAEL
    ITALY
    JAMAICA
    JAPAN
    JORDAN
    KAZAKHSTAN
    KENYA
    KIRIBATI
    KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF
    KOREA, REPUBLIC OF
    KUWAIT
    KYRGYZSTAN
    LAO PEOPLE'S DEMOCRATIC REPUBLIC
    LATVIA
    LEBANON
    LESOTHO
    LIBERIA
    LIBYAN ARAB JAMAHIRIYA
    LIECHTENSTEIN
    LITHUANIA
    LUXEMBOURG
    MACAU
    MACEDONIA, THE FORMER YUGOSLAV REPUBLIC
    MADAGASCAR
    MALAWI
    MALAYSIA
    MALDIVES
    MALI
    MALTA
    MARSHALL ISLANDS
    MARTINIQUE
    MAURITANIA
    MAURITIUS
    MAYOTTE
    MEXICO
    MICRONESIA, FEDERATED STATES OF
    MOLDOVA, REPUBLIC OF
    MONACO
    MONGOLIA
    MONTSERRAT
    MOROCCO
    MOZAMBIQUE
    MYANMAR (Burma)
    NAMIBIA
    NAURU
    NEPAL
    NETHERLANDS
    NETHERLANDS ANTILLES
    NEW CALEDONIA
    NEW ZEALAND
    NICARAGUA
    NIGER
    NIGERIA
    NIUE
    NORFOLK ISLAND
    NORTHERN MARIANA ISLANDS
    NORWAY
    OMAN
    PAKISTAN
    PALAU
    PANAMA
    PAPUA NEW GUINEA
    PARAGUAY
    PERU
    PHILIPPINES
    PITCAIRN
    POLAND
    PORTUGAL
    PUERTO RICO
    QATAR
    REUNION
    ROMANIA
    RUSSIAN FEDERATION
    RWANDA
    SAINT KITTS AND NEVIS
    SAINT LUCIA
    SAINT VINCENT AND THE GRENADINES
    SAMOA
    SAN MARINO
    SAO TOME AND PRINCIPE
    SAUDI ARABIA
    SENEGAL
    SEYCHELLES
    SIERRA LEONE
    SINGAPORE
    SLOVAKIA (Slovak Republic)
    SLOVENIA
    SOLOMON ISLANDS
    SOMALIA
    SOUTH AFRICA
    SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS
    SPAIN
    SRI LANKA
    ST. HELENA
    ST. PIERRE AND MIQUELON
    SUDAN
    SURINAME
    SVALBARD AND JAN MAYEN ISLANDS
    SWAZILAND
    SWEDEN
    SWITZERLAND
    SYRIAN ARAB REPUBLIC
    TAIWAN, PROVINCE OF CHINA
    TAJIKISTAN
    TANZANIA, UNITED REPUBLIC OF
    THAILAND
    TOGO
    TOKELAU
    TONGA
    TRINIDAD AND TOBAGO
    TUNISIA
    TURKEY
    TURKMENISTAN
    TURKS AND CAICOS ISLANDS
    TUVALU
    UGANDA
    UKRAINE
    UNITED ARAB EMIRATES
    UNITED KINGDOM
    UNITED STATES
    UNITED STATES MINOR OUTLYING ISLANDS
    URUGUAY
    UZBEKISTAN
    VANUATU
    VENEZUELA
    VIET NAM
    VIRGIN ISLANDS (BRITISH)
    VIRGIN ISLANDS (U.S.)
    WALLIS AND FUTUNA ISLANDS
    WESTERN SAHARA
    YEMEN
    YUGOSLAVIA
    ZAMBIA
    ZIMBABWE

    You can use this as a list for data validation.
    Martin

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Wanyet,

    To do this requires writing a VBA macro. This macro will copy the contents of the cell's Validation List to the clipboard. You can then paste it where you like. You will need to Copy the code below and Paste it into a Standard VBA Module in the Workbook.

    Installing the Macro:
    1. You may want to print this information.
    2. Copy the macro code below using the keys CTRL+C.
    3. Open the Excel workbook you want to put the Macro into.
    4. Press the keys ALT+F11. This opens the Visual Basic Editor.
    5. Press the keys ALT+I. This activates the Insert Menu.
    6. Press the letter M. This will insert a Standard VBA Module.
    7. Press the keys CTRL+V to paste the code into the module.
    8. Press the keys CTRL+S to save the macro.
    9. Press the keys ALT+Q to exit the Editor and return to Excel.

    To run the macro select the cell with the Drop Dwon arrow. Press the keys ALT+F8 to display the Macro List. Click "CopyValidationList" in the list and click the Run button. Next select the cell where you want the list and press the keys CTRL+V.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Last edited by Leith Ross; 04-09-2007 at 04:15 PM. Reason: Double signature

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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