+ Reply to Thread
Results 1 to 12 of 12

macro to copy unique data from sheet A one column only to sheet B

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    macro to copy unique data from sheet A one column only to sheet B

    Hi All

    I have a workbook with several worksheets

    One sheet named Database contains data from range A1 to AM1 which are headers, data reads actually to 75000 rows.

    Looking for macro to copy unique values of Column B1( named supplier ) only of database sheet to another sheet(validation) in same workbook at A1.
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: macro to copy unique data from sheet A one column only to sheet B

    Very fast

    Please Login or Register  to view this content.
    Last edited by davesexcel; 01-12-2017 at 02:45 PM.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro to copy unique data from sheet A one column only to sheet B

    Here is one suggestion:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: macro to copy unique data from sheet A one column only to sheet B

    Also use advanced filter.

    Please Login or Register  to view this content.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro to copy unique data from sheet A one column only to sheet B

    I would use:

    Please Login or Register  to view this content.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: macro to copy unique data from sheet A one column only to sheet B

    Different approach and much more faster than any loop.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: macro to copy unique data from sheet A one column only to sheet B

    Hello JBeaucaire,davesexcel,Winon

    Thanks to the solution, all of them worked marvelously.

    Thank you

  8. #8
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: macro to copy unique data from sheet A one column only to sheet B

    Quote Originally Posted by AB33 View Post
    Different approach and much more faster than any loop.
    Hi AB33

    Works perfectly but could you adjust to add the supplier header in the macro.
    Actually applying macro just give me the unique values but did not insert header Supplier

    Thanks for assistance

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: macro to copy unique data from sheet A one column only to sheet B

    Here we go!
    Attached Files Attached Files

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro to copy unique data from sheet A one column only to sheet B

    Thank you for the feedback JEAN1972,

    We could use the Code Below:

    In which I have applied the KISS principle of keeping it quick and simple.

    Please Login or Register  to view this content.
    Please see the revised attachment.

    Also, thank you for adding to my Reputation, Much appreciated!

    Kind Regards.
    Attached Files Attached Files
    Last edited by Winon; 01-12-2017 at 04:25 PM. Reason: Revised code and attachment

  11. #11
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: macro to copy unique data from sheet A one column only to sheet B

    Quote Originally Posted by Winon View Post
    Thank you for the feedback JEAN1972,

    We could use the Code Below:

    In which I have applied the KISS principle of keeping it quick and simple.

    Please Login or Register  to view this content.
    Please see the revised attachment.

    Also, thank you for adding to my Reputation, Much appreciated!

    Kind Regards.
    Thanks Winon

  12. #12
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro to copy unique data from sheet A one column only to sheet B

    You are welcome JEAN1972,

    Glad I could help.

    Also, thank you for adding to my Reputation, Much appreciated!

    Kind Regards.

+ 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] Macro who copy the data from one sheet to another sheet basis of 2 other column cell value
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2015, 12:47 PM
  2. [SOLVED] Macro who copy the data from one sheet to another sheet basis of 2 other column cell value
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2015, 09:49 AM
  3. [SOLVED] Macro to Copy data from one sheet to another sheet if column headings match
    By harman83 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-04-2015, 02:40 AM
  4. [SOLVED] Macro to filter column and copy rows to new sheet with loop for all unique values in colum
    By Gryphoune in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2015, 09:15 AM
  5. [SOLVED] Macro to copy and paste only unique values from one column to another column in same sheet
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-19-2014, 05:44 AM
  6. Macro button to copy data from one sheet to another sheet's next available column
    By Alice21 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-23-2013, 08:02 AM
  7. [SOLVED] Macro to identify a unique value in a column to copy and paste value to another sheet
    By bonny24tycoon in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-04-2012, 07:59 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