+ Reply to Thread
Results 1 to 9 of 9

Need macro to copy a date from a cell and paste into drop down column filter

  1. #1
    Registered User
    Join Date
    01-19-2016
    Location
    Jacksonville, FL
    MS-Off Ver
    2013
    Posts
    22

    Need macro to copy a date from a cell and paste into drop down column filter

    I'm trying to allow a user to enter a date into a cell and have a macro simply copy the date and paste into 'Date Filters' in the drop down filter at the top of a column. I've recorded the macro to do just that, but it seems to keep the original date I entered when recording the macro even after changing it in the cell and running again. Is this not achievable the way I have set it up? Many thanks..

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need macro to copy a date from a cell and paste into drop down column filter

    It is achievable but please show us the code you have now, and we can provide the update. What cell has the date you want to use?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-19-2016
    Location
    Jacksonville, FL
    MS-Off Ver
    2013
    Posts
    22

    Re: Need macro to copy a date from a cell and paste into drop down column filter

    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 04-04-2017 at 03:11 PM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need macro to copy a date from a cell and paste into drop down column filter

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need macro to copy a date from a cell and paste into drop down column filter

    Try this. I would be happy to test it if you provide your file:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-19-2016
    Location
    Jacksonville, FL
    MS-Off Ver
    2013
    Posts
    22

    Re: Need macro to copy a date from a cell and paste into drop down column filter

    Ah, sorry about the rule. Now I know.. I just tested that and it is reading from cell A2 in the wrong sheet. I need it to read from "Enter_Date" sheet, and the filter is on "Enabled_Only"

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need macro to copy a date from a cell and paste into drop down column filter

    For code like this it is important to mention what module it is in, and what sheets you are working with. I am guessing a generic module like Module1. In that case it is better to explicitly identify sheets, rather than use defaults or ActiveSheet.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    01-19-2016
    Location
    Jacksonville, FL
    MS-Off Ver
    2013
    Posts
    22

    Re: Need macro to copy a date from a cell and paste into drop down column filter

    That worked, thanks!

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need macro to copy a date from a cell and paste into drop down column filter

    You're welcome!

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking on the star icon addreputationicon.jpg below their name.

+ 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. Macro to copy & paste data into new sheet depending on column header (date)?
    By BobbyH89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2015, 03:44 PM
  2. macro need to copy & paste the date mentioned in a column for all the values
    By excelhelpseeker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2015, 06:44 AM
  3. [SOLVED] macro to copy and paste only the rows containing a date in column A
    By s_vinti in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2012, 01:58 PM
  4. Replies: 3
    Last Post: 03-15-2012, 10:01 PM
  5. Macro to copy and paste special values for column data and filter column data
    By ascottbag in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-10-2012, 02:15 PM
  6. Macro to filter based on column heading then copy and paste to new sheet
    By macattackr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2012, 05:14 PM
  7. Copy cell value and paste into filter macro
    By benno87 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-05-2008, 11:03 PM

Tags for this Thread

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