Solved

Copy Data from one worksheet to another worksheet

Posted on 2014-04-17
4
254 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now