+ Reply to Thread
Results 1 to 4 of 4

How to copy selected columns from one sheet to another?

  1. #1
    Forum Contributor
    Join Date
    08-08-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    196

    How to copy selected columns from one sheet to another?

    Dear experts,

    I am writing to request some help, allowing me to extract rows of specific columns from sheet1, where name is present in columns A, into sheet2. I have an example file attached below, which shows sheet1, as input data and sheet2, as desired output.
    final_extraction.xls

    Please advice and any guidance would be most appreciated.

    Thank you all.

  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
    53,048

    Re: How to copy selected columns from one sheet to another?

    If I understand you correctly, try this, copied down and across...
    =IFERROR(INDEX(Sheet1!$B$2:$T$10,MATCH(Sheet2!$A2,Sheet1!$A$2:$A$10,0),MATCH(Sheet2!B$1,Sheet1!$B$1:$T$1,0)),"")
    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
    08-08-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    196

    Re: How to copy selected columns from one sheet to another?

    Hi, Thank you for your quick response. The formula works great extracting columns from B onwards in sheet2, but it fails to copy name from sheet1 into sheet2.

    if its not too much trouble, is this issue feasible into the current formula.

    Please advice further. many thanks

  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
    53,048

    Re: How to copy selected columns from one sheet to another?

    OK we can do that with a helper column in sheet1 (I used column U) In U2, copied down...
    =IF(A2="",U1,U1+1)

    Then in sheet2 A2, copied down...
    =IFERROR(INDEX(Sheet1!$A$2:$A$10,MATCH(ROW(A1),Sheet1!$U$2:$U$10,0)),"")

    You can hide the helper if you want

+ 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] Copy only rows with data to second sheet (selected columns)
    By shoban13 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 01:52 PM
  2. [SOLVED] Trying to copy selected items from sheet to listbox then selected back to sheet
    By BigWes1960 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-14-2013, 03:27 PM
  3. [SOLVED] Merging selected sheets with selected columns into another sheet
    By harry_1805 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2013, 01:51 PM
  4. Replies: 3
    Last Post: 01-18-2012, 01:30 PM
  5. [SOLVED] Copy Selected Columns to Same Sheet
    By egavasrg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-26-2011, 03:08 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