Solved

Copy Data from one worksheet to another worksheet

Posted on 2014-04-17
4
262 Views
Last Modified: 2014-04-18
Attached is a workbook that needs the SUN to SAT data from the ActiveDays Worksheet copied to the appropriate cells within the ID worksheet.

In the ActiveDays worksheet, there is one row of SUN to SAT data, for each major category, ID_Parent, within the ID worksheet.  In the ID worksheet, there is the ID_Parent column (Col A), with several other minor categories, or children (Col B), of the ID_Parent.

What is needed is a way, probably VBA, to copy the SUN to SAT data into each column, from the ActiveDays worksheet into the same fields of the ID worksheet, based on the Col A (ID_Parent) criteria.  Rows 2 and 3 of the ID worksheet provide an example.

Therefore, if a cell in column A, within the ID worksheet is ABCD, then the code would look for ABCD in the Activedays worksheet, and copy the values from columns B to H into columns D to J of the ID worksheet.
Combine-Tables.xlsx
0
Comment
Question by:Cook09
  • 2
  • 2
4 Comments
 
LVL 22

Expert Comment

by:Flyster
ID: 40008124
I believe you can achive that result using SUMPRODUCT. In cell D2 the formula would be:

=SUMPRODUCT((ActiveDays!B:B),--(ActiveDays!$A:$A=$A2))

See attached.

Flyster
Combine-Tables.xlsx
0
 

Author Comment

by:Cook09
ID: 40008904
Flyster,

Yes it seems to work, but takes a very long time to update the calculations.  I had to put it to Manual.  Is there another method that is not so processor intensive?  But, I do like the formula aspect.

Cook09
0
 
LVL 22

Accepted Solution

by:
Flyster earned 500 total points
ID: 40009022
Here it is using SUMIF. D2 formula is:

=SUMIF(ActiveDays!$A:$A,$A2,ActiveDays!B:B)
Combine-Tables-Sumif.xlsx
0
 

Author Closing Comment

by:Cook09
ID: 40009461
Exactly what I needed.  Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question