+ Reply to Thread
Results 1 to 5 of 5

Search, Select, Copy, and Paste Specific Data

  1. #1
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    116

    Search, Select, Copy, and Paste Specific Data

    Hello All,
    Can someone please help me with this?
    I have a workbook with a tab that contains a total inventory (Main). I want a formula that will search the rows from tab Main, and return the full row of that information. There is an attached sample sheet. So, under Tab Red, the cells should copy and fill in all rows and columns if there is a "Red" in Tab Main. I can't use links as the number of Reds is dynamic and so can change and links will return wrong information. So Tab Yellow, Cell A2:G2, should return the data from Main A11:G11.
    Again, the number of Room Colours or Room Numbers is subject to change, and so the changes should be accurately pasted into the respective tabs.
    I hope this makes sense.
    Thank you.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Search, Select, Copy, and Paste Specific Data

    Try this ARRAY formula in A2, copied down and across. Repeat for each sheet, but change the sheet name (Red/Blue/etc)
    =IFERROR(INDEX(Main!A$2:A$19,SMALL(IF(Main!$A$2:$A$19="Red",ROW(Main!$A$2:$A$19)-1),ROWS($A$1:A1))),"")
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Search, Select, Copy, and Paste Specific Data

    Hello Ford,
    Thank you for your message. I did not receive a reply posted message and only upon checking saw there was a reply. My apologies for not checking sooner.
    Your formula worked, however, it only pasted data into Column A. Can you edit your formula so it returns all the info for the respective row?
    I've pasted the updated workbook,
    Thanks,
    SP
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Search, Select, Copy, and Paste Specific Data

    You just need to copy it across, like I said above No change needed

  5. #5
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Search, Select, Copy, and Paste Specific Data

    I missed that , sorry
    But it worked like a charm
    Thank you very much Ford!

+ 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 to search, copy and paste in a specific location.
    By barrigadf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2015, 03:23 PM
  2. Select file, specific tab, then copy/paste
    By ntffl07 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-27-2013, 07:34 AM
  3. Replies: 1
    Last Post: 11-14-2012, 01:33 PM
  4. Search, Copy and paste specific field from one workbook to another
    By CARRpeter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-10-2012, 11:16 PM
  5. Search, select,cut and paste the data into a new sheet
    By Arun7777 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-12-2012, 05:50 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