Link to home
Start Free TrialLog in
Avatar of Cook09
Cook09Flag for United States of America

asked on

Copy Data from one worksheet to another worksheet

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
Avatar of Flyster
Flyster
Flag of United States of America image

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
Avatar of Cook09

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Flyster
Flyster
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cook09

ASKER

Exactly what I needed.  Thanks