+ Reply to Thread
Results 1 to 6 of 6

select unique values range to column

  1. #1
    Registered User
    Join Date
    07-11-2016
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    2

    select unique values range to column

    Sub SelectUniqueValues()

    'I want to select the unique values from range("A4:F70")
    'and show them from K4, sorted aswell.
    'the script works fine, but only for the first column, not for the wanted range,
    'I tries several changes, but they don't work.
    'What does I have to change?


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by rhvanloenen; 07-11-2016 at 07:19 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: select unique values range to column

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: select unique values range to column

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: select unique values range to column

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-11-2016
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    2

    Re: select unique values range to column

    Tnx. Ik works as I wanted.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: select unique values range to column

    You are welcome and thanks for the rep.

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

+ 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. Replies: 2
    Last Post: 08-19-2015, 10:22 AM
  2. Count Unique Values within range when other column is not blank
    By samn827 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-29-2015, 09:50 AM
  3. [SOLVED] Count unique text values within a range based on another column
    By Sebastes in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-14-2014, 01:38 PM
  4. Count Unique Values In One Column Basis Unique Values in Another Column
    By shez_raz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-07-2012, 01:55 AM
  5. Replies: 3
    Last Post: 09-20-2011, 05:05 PM
  6. Select Unique values ....
    By shahcu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2008, 05:11 AM
  7. [SOLVED] How to select a range based on values in 1 column
    By ForestRamsey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2005, 12:05 PM

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