+ Reply to Thread
Results 1 to 7 of 7

Search Range for Specific Multiple Unique Values and Copy/Paste

  1. #1
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Midwest
    MS-Off Ver
    Excel 365
    Posts
    124

    Search Range for Specific Multiple Unique Values and Copy/Paste

    Hi All,

    I have range G2:G1302 of which each cell has a variety of lengthy descriptions in them. In most of these cells is one or more references to a WT number. This is shown at "WT-XXXXX" where "XXXXX" is the number. Sometimes it is a 5 digit number, sometimes a 6 digit number. The "WT" is always preceded by a ">" character, and the "XXXXXX" number is followed by a space or "<". So I need to use this criteria and extract every time an unique WT number is called out in the G cell and past that value in column H, I, J, etc. based on how many unique WT numbers are in that G cell. This is more than a simple "Find" macro due to possibly copying more than one value from the G cells, so I'm hoping to get an assist. Attached is an image of what I'm talking about. Notice the multiple "WT-XXXXXX" numbers. Thanks in advance!

    Luke
    Attached Images Attached Images

  2. #2
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    419

    Re: Search Range for Specific Multiple Unique Values and Copy/Paste

    I think this will help:
    Please Login or Register  to view this content.
    Last edited by mgs73; 03-10-2020 at 07:25 PM.

  3. #3
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Midwest
    MS-Off Ver
    Excel 365
    Posts
    124

    Re: Search Range for Specific Multiple Unique Values and Copy/Paste

    That worked great! I found a few exceptions, but I should be able to work with your code to include those. Thanks so much!

  4. #4
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Midwest
    MS-Off Ver
    Excel 365
    Posts
    124

    Re: Search Range for Specific Multiple Unique Values and Copy/Paste

    Okay. So I've been messing with this for the past few hours and it turns out there are too many variables after the "XXXXXX" number. However, I have noticed that all these numbers are 6 digits long. So how can I modify the above code to copy/paste the number after identifying the unique WT value? Thanks again!

    -Luke

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

    Re: Search Range for Specific Multiple Unique Values and Copy/Paste

    If you upload a workbook with the data and result that you want, it will help.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.

  6. #6
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Midwest
    MS-Off Ver
    Excel 365
    Posts
    124

    Re: Search Range for Specific Multiple Unique Values and Copy/Paste

    An example workbook should be attached. There are only a few rows, but it shows how I need to isolate/copy/paste each instance of the WT-XXXXX number that's in the description cells. Thanks again.

    - Luke
    Attached Files Attached Files

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

    Re: Search Range for Specific Multiple Unique Values and Copy/Paste

    Try
    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. VBA - copy paste specific values to range when 3 criterias match
    By VBwArrior in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2019, 08:48 AM
  2. [SOLVED] Copy and Paste as Values to Last Empty Row of Specific Range
    By chergian in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-16-2018, 08:21 PM
  3. [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
  4. [SOLVED] Search for multiple matching cells and copy/paste range?
    By papercut in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2014, 11:24 AM
  5. [SOLVED] Copy and paste range as values to specific sheet/range
    By lukestkd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-06-2014, 09:48 PM
  6. Search for specific date range, copy entire row and paste to new worksheet
    By turias in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2013, 03:57 PM
  7. Pick, copy and paste rows containing specific range of values
    By Kenneyd71 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2012, 09:44 AM

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