+ Reply to Thread
Results 1 to 6 of 6

Copy and Paste Unique Values from Dynamic Range to New Worksheet

  1. #1
    Registered User
    Join Date
    03-07-2024
    Location
    New York
    MS-Off Ver
    Microsoft 365 Version 2302
    Posts
    6

    Copy and Paste Unique Values from Dynamic Range to New Worksheet

    I am newer to understanding macros. I was able to partially reach a solution.

    Instead of 'Printing Unique Values to the Immediate window in VBA (which does show the unique values I need it to), I would like the unique values pasted to my "Macros" worksheet starting in cell F7. This is a dynamic range so I know my starting cell of F7, but I do not know how many unique values will be found when the code is run.

    How would I paste these values? Thank you for your help!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Copy and Paste Unique Values from Dynamic Range to New Worksheet

    Probably a naive/stupid question but, given you are using 365, why do you need a macro at all? You could do this with the UNIQUE function.

    Something like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-07-2024
    Location
    New York
    MS-Off Ver
    Microsoft 365 Version 2302
    Posts
    6

    Re: Copy and Paste Unique Values from Dynamic Range to New Worksheet

    TMS, I would like to use a macro because this is a small part of a much larger automation I am trying to create.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Copy and Paste Unique Values from Dynamic Range to New Worksheet

    Basic idea, and untested, but try:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-07-2024
    Location
    New York
    MS-Off Ver
    Microsoft 365 Version 2302
    Posts
    6

    Re: Copy and Paste Unique Values from Dynamic Range to New Worksheet

    Thank you! That worked perfectly!

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Copy and Paste Unique Values from Dynamic Range to New Worksheet

    You're welcome.

    You may need to clear the output area if you want/need to re-run the macro, otherwise it's likely you will get a #SPILL! error.


    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Use VBA to Copy & Paste Unique Value from One Worksheet to Another (Paste as Values)
    By jhiltz725 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-02-2021, 03:12 PM
  2. VBA - Copy and paste dynamic range column from one worksheet to another
    By ChrisFoster1uk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2020, 09:22 AM
  3. [SOLVED] Copy & Paste Dynamic Range to New Worksheet
    By spencerp237 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2017, 06:02 PM
  4. [SOLVED] Copy & Paste all unique values from a range
    By liamfrancis2013 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2016, 07:09 AM
  5. [SOLVED] VBA Dynamic way to copy and paste unique values
    By Joakim1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-07-2014, 07:31 AM
  6. Copy and paste unique values to another worksheet
    By gsrai31 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-28-2009, 11:44 AM
  7. paste values from named dynamic range to another worksheet
    By Nate H in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2006, 02:50 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