+ Reply to Thread
Results 1 to 12 of 12

Extract unique items based on criteria

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Extract unique items based on criteria

    Hello everybody
    I have some names in range ("A1:A20") and some names are repeated (existing more than once)
    and in range("B1:b20") some cells have the value the string value ("A")

    I want to extract unique names that have the string value ("A")

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Extract unique items based on criteria

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

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

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Extract unique items based on criteria

    try something like this to run through names in column A

    Please Login or Register  to view this content.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Extract unique items based on criteria

    As per your description, try this......
    The code below will place the unique names from col. A in col. C starting from C2. Change it as per your requirement if needed.
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  5. #5
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Extract unique items based on criteria

    Hi,

    An alternative :
    Please Login or Register  to view this content.
    Regards
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract unique items based on criteria

    Thanks a ot everybody
    Mr. sktneer
    i tried to change the range to ("A2:B20")
    and I changed this line
    For i = 1 To 20 to For i = 2 To 20 to adjust the rows but i got error

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Extract unique items based on criteria

    Make the following change also other than what you already changed.

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract unique items based on criteria

    thanks sir for help
    thanks a lot everybody for wonderful solutions

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

    Re: Extract unique items based on criteria

    One more, no loop.
    Please Login or Register  to view this content.

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract unique items based on criteria

    Mr. jindon I tried to edit the code to be like that
    Please Login or Register  to view this content.
    replaced the string A with the string X
    changed the variable x to be xx
    changed the cell where to get the results ..
    but I didn't get any results

    I tested it at first and it worked very well .. but after these logical changes for me it didn't work

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

    Re: Extract unique items based on criteria

    You have one more "A" to replace with "X....
    Please Login or Register  to view this content.

  12. #12
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract unique items based on criteria

    Thanks for help
    Thank you very much everybody

+ 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] Extract Unique Text Values based on Multiple Criteria
    By Kattenhove in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-26-2014, 07:59 AM
  2. Extract Unique Field Based on Criteria
    By nguyenal07 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-20-2014, 02:33 PM
  3. Extract Unique Value Based on Criteria
    By freqzz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-21-2013, 03:41 AM
  4. [SOLVED] Extract unique values out of list based on an extra criteria
    By sven1975 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2012, 05:02 AM
  5. Extract Unique Values from an Array based on Criteria
    By ronleex324 in forum Excel General
    Replies: 1
    Last Post: 10-04-2011, 06:37 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