+ Reply to Thread
Results 1 to 6 of 6

Copy & Paste specific cells to a summary sheet

  1. #1
    Registered User
    Join Date
    05-01-2015
    Location
    Vancouver, BC
    MS-Off Ver
    2010
    Posts
    35

    Copy & Paste specific cells to a summary sheet

    Hello Excel wizards,

    Hoping to receive some help today on an excel issue I'm facing.

    My excel workbook contains 2 worksheets: one named 'data' and the other 'summary'. I'm attaching here for everyone to see.

    Before I explain the issue I'm wondering if there is a non-VBA/non-macro approach to solving this issue. If not then i'm okay with any VBA suggestions.

    My Data sheet contains rows and ranges that are sectionalized by province and the range will be dynamic. I will continue to insert new rows of data for every month going forward.

    What I would like the formula/macro to do is look at the the province, then search for the last month/row that contains numbered data and paste it over to the Summary sheet.

    I don't believe a simple v-lookup or index match function could work but I may be wrong. Any help is always appreciated and many thanks in advance!
    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,939

    Re: Copy & Paste specific cells to a summary sheet

    How many locations would you have?
    Could you set the Data tables up to show all months?
    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
    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,939

    Re: Copy & Paste specific cells to a summary sheet

    This works on what you have...
    =INDEX(OFFSET(Data!C$1,MATCH(Summary!$A2,Data!$A$1:$A$15,0),0,6,1),MATCH(0,OFFSET(Data!$C$1,MATCH(Summary!$A2,Data!$A$1:$A$15,0),0,6,1),-1))

    I can probably figure out how to cant how many months you have, and feed that int that calc, but it would be simpler if I could just use 12 (months)

  4. #4
    Registered User
    Join Date
    05-01-2015
    Location
    Vancouver, BC
    MS-Off Ver
    2010
    Posts
    35

    Re: Copy & Paste specific cells to a summary sheet

    Thanks for the quick reply FDibbins and great solution!

    The preferable method would be for the dataset to have a dynamic range rather than a static one. However not sure if this is possible with using only formulae, and as you suggested a fixed range with absolute references could work fine.

    What I see is that the dataset will grow and more locations may be added to the data sheet as I receive more data.

    Within each 'province' data range there will be new rows/months inserted which means the dataset will grow.

  5. #5
    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,939

    Re: Copy & Paste specific cells to a summary sheet

    The amount of locations is not a big deal, you just need to increase the range for the OFFSET
    If you add all the extra months in, you could hide the months not arrived at yet.

    OK lets see if I can make the month range dynamic.

    As this is a dummy setup, I have to ask - can I use a COUNTA() based on the range =COUNTA($B$1:$B$9) in Data?
    This assumes that B1 and B9 (currently) will be empty, and that you will enter new rows right below the last month (currently at row 8)
    If these 2 cells WILL have data (headings?) in then, then maybe =COUNTA($B$1:$B$9)-2
    ?

  6. #6
    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,939

    Re: Copy & Paste specific cells to a summary sheet

    The dynamic formula would then be...
    =INDEX(OFFSET(Data!C$1,MATCH(Summary!$A2,Data!$A$1:$A$15,0),0,COUNTA(Data!$B$1:$B$9),1),MATCH(0,OFFSET(Data!$C$1,MATCH(Summary!$A2,Data!$A$1:$A$15,0),0,COUNTA(Data!$B$1:$B$9),1),-1))

+ 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 specific cells contents to another sheet and paste at the bottom of a column
    By markDuffy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-21-2015, 06:43 AM
  2. copy a range of cells N times and paste in separate sheet and also change a specific colum
    By maramkarthik in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2013, 04:27 AM
  3. [SOLVED] Copy from different sheets and paste to summary sheet
    By ischopra in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-02-2013, 09:59 AM
  4. Copy specific data from differint cells and paste in one sheet
    By cyberzard in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2013, 02:25 AM
  5. Replies: 1
    Last Post: 03-28-2013, 02:49 PM
  6. Copy active row and paste to specific cells on different sheet
    By XxCMoneyxX in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2013, 03:03 PM
  7. Find specific cell, copy row from several tabs and paste in summary sheet
    By helnil in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-11-2012, 08:16 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