Count and sum?

nparsons75

Well-known Member
Joined
Sep 23, 2013
Messages
1,254
Office Version
  1. 2016
Hi, I have two tables, in two seperate worksheets. I will refer to them as table and table 2.

In table one I have a reference number in col A and a value (%) which i would like to show in col B.

Table 1

Reference% Progress
1
2
3
4

<tbody>
</tbody>


In Table 2 I have a unique reference number in col A, in col B I have a number that will match that of one of the references in col A of table 1. In col C I have a another % progress value.

Table 2

Unique ReferenceReference (to Table 1)% Progress
10215%
11230%
12110%
1325%

<tbody>
</tbody>


From the two tables in seperate worksheets i need to calculate the total % using the reference number. So as an example, table one, when the correct formula is applied will look like the below:

Reference% Progress
110%
250%
30%
40%

<tbody>
</tbody>


So, Table 1 needs to look at table 2, it will look to see if any reference in col B of table 2 are the same as the reference in table 1. If it is it will add up the sum of all those that match and return a result showing the sum of all percentages matching the reference as in example above.

I hope that makes some kind of sense and I thank you in advance for your support.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Book1
ABC
1Unique ReferenceReference (to Table 1)% Progress
210215%
311230%
412110%
51325%
Sheet2



Book1
AB
1Reference% Progress
210.1
320.5
430
540
Sheet1

In B2 enter and copy down:

=SUMIFS(Sheet2!$C$2:$C$5,Sheet2!$B$2:$B$5,A2)
 
Last edited:
Upvote 0
@njimack, in the example i only show 4 rows, however there are currently 200+ with more to come? Is there a way to replicate the formula down?

The current formula I use is is a combination of sum if and count if. It used to work but I cant get it to work anymore for some reason...

=IFERROR(SUMIF(Table1[@PIC],Table1[LEAD])/COUNTIFS(Table1[@LEAD],A15),0)
 
Upvote 0
Hi, this formula has worked thank you. The only issue I have is that is showing the total value (Which is what i asked for by mistake....) The result I need is at what progress the reference is at in sheet 1. So,

Reference 2 is equal to 50%, however this is the total. If all were at 100% that would then so 300%. I need it to show 100%. I think it needs to be the average. So, if the values were 100%, 100% and 1%, the total value would be 67%. I think this is why I originally had the countif as part of the formula. So it would count the number of references that matched, sum them and average them.

This was the original formula that i can no longer get to work....

=IFERROR(SUMIF(Table1[@PIC],Table1[LEAD])/COUNTIFS(Table1[@LEAD],A15),0)
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,580
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top