+ Reply to Thread
Results 1 to 3 of 3

Worksheet Macro using dropdown list

  1. #1
    Registered User
    Join Date
    07-30-2014
    Location
    Colorado
    MS-Off Ver
    2010
    Posts
    6

    Worksheet Macro using dropdown list

    I am trying to build my first worksheet macro. I have a dropdown list in a worksheet "Active Email" with "Yes" and 'No". When Yes is selected I want to cut that entire row and paste it in worksheet "Archived Emails". I feel I am close with the code but when I select the word from the dropdown, nothing happens. Any assistance would be appreciated. Here is what I have so far.

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 5 Then
    If UCase(Target.Value) = "Yes" Then
    Target.EntireRow.Copy Destination:=Sheets("Archived Emails"). _
    Range("A" & Rows.Count).End(xlUp).Offset(1)
    Target.EntireRow.Delete
    End If
    End If
    End Sub

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,943

    Re: Worksheet Macro using dropdown list

    This should do it.... just make sure that column A is filled or the code will overwrite existing rows.

    Please Login or Register  to view this content.
    Though this would be better code:

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 08-05-2014 at 12:41 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    07-30-2014
    Location
    Colorado
    MS-Off Ver
    2010
    Posts
    6

    Re: Worksheet Macro using dropdown list

    That works perfectly! Thank you for the help.

+ 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. Dropdown List from Another Worksheet
    By mycon73 in forum Excel General
    Replies: 3
    Last Post: 02-03-2011, 06:46 PM
  2. Using a dropdown list to autofill a worksheet
    By throughhiseyes7 in forum Excel General
    Replies: 4
    Last Post: 07-08-2010, 01:57 PM
  3. create a dropdown list on one worksheet/tab, from another worksheet/tab
    By harchunk in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-16-2007, 03:46 AM
  4. Worksheet List, Dropdown List Excel 2000!
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-08-2006, 12:10 AM
  5. how can I remove a dropdown list from my worksheet
    By Boomer in forum Excel General
    Replies: 4
    Last Post: 04-04-2006, 11:10 AM

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