+ Reply to Thread
Results 1 to 15 of 15

Copy only unique values based on range

  1. #1
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    Copy only unique values based on range

    So basically at the start of the day I will print a list of numbers and place them in column A on tab "MASTER". Now the list will update automatically in column A in tab "MSINDOOR" . Now I would like the code to match my column A in "MSINDOOR" with column A in "MASTER" and place the unique ones in the first available column in A on tab "For Door Completion".

  2. #2
    Registered User
    Join Date
    05-29-2009
    Location
    Denver, CO
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Copy only unique values based on range

    You could probably use the filter the vba

    Range("A1:A8").AdvancedFilter Action:=xlFilterInPlace, Unique:=True to select the unique items and they just copy and paste into a new cell.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy only unique values based on range

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    Re: Copy only unique values based on range

    Oh one thing I forgot to add. After it puts the unique numbers in the column "A" on "For Door Completion" can it also put those numbers on the MASTER list so it doesn't print those numbers again?

  5. #5
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy only unique values based on range

    Add the new line below the existing line:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    Re: Copy only unique values based on range

    Please Login or Register  to view this content.
    it is erroring right there
    Last edited by vitt4300; 01-19-2015 at 01:46 PM.

  7. #7
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    Re: Copy only unique values based on range

    it says Type mismatch

  8. #8
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Copy only unique values based on range

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  9. #9
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    Re: Copy only unique values based on range

    I can't do that, my company will not allow me to upload files.

    I could email it but thats about it.
    Last edited by vitt4300; 01-19-2015 at 02:14 PM.

  10. #10
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Copy only unique values based on range

    Okay then..
    Before trying the code below, make sure you give a same column heading to both columns ie in Master Tab and MSINDOOR tab.
    I mean the columns you are matching must contain the same headings in their first cell.


    Please Login or Register  to view this content.
    Last edited by Vikas_Gautam; 01-19-2015 at 02:56 PM.

  11. #11
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy only unique values based on range

    No error on my end. Don't know what to tell you.

    Without your workbook to look at it is difficult to say what is causing the error. Best of luck.

  12. #12
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Copy only unique values based on range

    If you can't provide a workbook ..
    Provide some screenshots if you can. that would help.

  13. #13
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    Re: Copy only unique values based on range

    So the code is working now, however if there is only 1 number to move then the code errors

  14. #14
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Copy only unique values based on range

    Have you tried the one in Post 10...?

    Give that a try, if you can.. and share the results...

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

    Re: Copy only unique values based on range

    Try this
    Please Login or Register  to view this content.

+ 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. [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
  2. [SOLVED] Sum selected values in matrix based on date range as well as unique identifier in row
    By smansyd in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-09-2014, 07:56 PM
  3. Copy unique rows based on two cell values
    By ArtySin in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-17-2014, 04:24 PM
  4. Automatically copy values based on unique/new criteria from a range
    By djarcadian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-31-2013, 08:45 PM
  5. Replies: 6
    Last Post: 03-31-2009, 11:17 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