+ Reply to Thread
Results 1 to 3 of 3

copy specific columns from variable sheet names to specific sheet tab

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

    copy specific columns from variable sheet names to specific sheet tab

    I have a workbook with several sheets , my concern is sheet master and workings

    Both have headers in common but differs in column position

    that is header on master sheet is to be copied to workings sheet columns from B TO D which has same headers and so on .

    Some headers need not to be copied from Master and Workings , however my issue that the workbook I recieved all do not have the sheet tab master, but workings tab always exist with same header columns.

    The master sheet alternate name can be named invoicing or Teu No or other but have always same headers

    So an imput box to select sheet and copy to workings sheet as expected results attachement.

    http://www.ozgrid.com/forum/showthread.php?t=202531
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: copy specific columns from variable sheet names to specific sheet tab

    Let me restate what the requirement is before I start and then when you confirm, we can start working. You receive a sheet with a tab Workings. Sometimes it contains the Master Sheet with headers only, sometimes it does not. You want to copy only certain columns from workings to master.

    How does this sound for a solution. You have a spreadsheet with a Master "template" sheet on it. You import the data from the working sheet. This can be done by taking the working sheet file and putting it in the same directory with the spreadsheet and letting the code do the work of importing it. We would have to know the working sheet file name. Either you will have to rename it to a specific name, or it will have to have a predictable name such as a fixed name with a date stamp.

    The other thing you can do is open the working file and copy and paste the data in. Sometimes this is easier.

    You will also have to come up with a "map" to tell the program what columns you want to copy and where to get the column from. For example if you want to copy DESIGNATION you need to tell the program to go to column G on the workings sheet and put the result in column E of the Master sheet.

    You will not need a map if you want everything on the master sheet to be copies and those columns exist with the same name on the workings sheet. The program can look for that name header and copy it. If it can't find that name header on the workings sheet, it will skip it.

    So please confirm how you get the file and if you want the program to import the data or use copy / paste. Also confirm that you want everything on the master sheet filled in - the program will find where that column header is on the workings sheet. Finally confirm that the column names on the master and workings sheet are identical.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: copy specific columns from variable sheet names to specific sheet tab

    Oops. I see that you already have the map. Do you want to leave columns B & C blank or remove them so Invoice number is in column A and Code article is in column B?

+ 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 rows with specific text in specific column into specific sheet
    By Valemaar in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-22-2014, 03:23 PM
  2. copy data from multiple sheet to master sheet with specific columns only
    By sinha.riteshabap in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 06:59 AM
  3. Replies: 0
    Last Post: 04-11-2013, 05:33 PM
  4. Replies: 8
    Last Post: 04-04-2013, 08:02 PM
  5. [SOLVED] Copy variable range from sheet to the last row with a specific blank column in new sheet
    By seputus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 07:29 PM
  6. Copy Specific Columns to new Sheet
    By DNADOC in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-10-2010, 10:15 PM
  7. Copy specific columns to specific cell on new sheet
    By jones_net in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2010, 02:34 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