Avatar of pg1533
pg1533
 asked on

Consolidate the data

Hi,

I have attached a workbook named as ‘Sample’. It has two worksheets in it. They are

1.      Calculations
2.      Dump

In ‘Calculations’ worksheet, it has “Name’ column and there are two columns for each month starting from Aug ’13 to Mar ’14. In ‘Dump’ worksheet there are three columns ‘Date’, ‘Name’ and ‘Count’ and has some data is filled in each column.

With reference to the ‘Name’ columns in both the worksheet the sum of the count should be pulled up in ‘Aug ‘13’ column in ‘Calculations’ worksheet. Likewise it should repeat for all the clients and months. I have given few examples filled in for your reference.

I can use a vlookup to fetch the data from the other sheet. However, a macro  / formula (other than vlookup) doing this would really help me. Once I paste the data in ‘Dump’ worksheet and click on a button then values should reflect in respective cell. Please do the needful.

Thank you,
Prashanth
Sample.xls
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
pg1533

8/22/2022 - Mon
Faustulus

Would something like this work for you?
=SUMPRODUCT(--(Dump!$B$2:$B$64536=$A2),--(MONTH(Dump!$A$2:$A$64536)=MONTH(B$2)),Dump!$C$2:$C$64536)

Open in new window

You can paste the formula in cell B2 of your Calculations worksheet and copy it from there to other rows and columns.
pg1533

ASKER
Hi,

I tried using this formula. However, I got a 'circular reference' warning and the result is showing as '0'. Please advice. Thank you for your time and support on this.

Regards,
Prashanth
pg1533

ASKER
Also, it should consider the year also. If there are May 13 and May 14 then this formula will not help since it is pulling data based on month and not on year. The data should be pulled based on month and year. Please advise
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
als315

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
pg1533

ASKER
Hi als315,

The formula is perfectly working fine. If there is a huge data then it is taking time to calculate. Is there a way to mitigate the time it is taking to calculate or can we use a macro to do this? Please do the needful. Thank you so much for your support and time.

Regards,
Prashanth
als315

I prefer for such cases to use Pivot tables.
Sample.xls
pg1533

ASKER
thank you
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Faustulus

Hello pg1533,
Sorry I didn't get back to you quickly enough. Just didn't have the time to log in. I'm glad you got a solution to your problem.
pg1533

ASKER
No Problem. Please do not be sorry. I understand. Thank you for your time and support.
Take care.

Regards,
Prashanth