Sum if it's bottom n values in other sheet

reagk

New Member
Joined
Apr 7, 2019
Messages
4
Hi, I want to sum n values in sheet 2, if the same rows in sheet1 it's the bottom n values.
For example:
[TABLE="width: 320"]
<tbody>[TR]
[TD="class: xl65, width: 128, colspan: 2"]Sheet 1[/TD]
[TD="width: 64"][/TD]
[TD="class: xl65, width: 128, colspan: 2"]Sheet 2[/TD]
[/TR]
[TR]
[TD="class: xl64"]A[/TD]
[TD="class: xl64, align: right"]8[/TD]
[TD][/TD]
[TD="class: xl64"]A[/TD]
[TD="class: xl64, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl64"]B[/TD]
[TD="class: xl64, align: right"]3[/TD]
[TD][/TD]
[TD="class: xl64"]B[/TD]
[TD="class: xl64, align: right"]15[/TD]
[/TR]
[TR]
[TD="class: xl64"]C[/TD]
[TD="class: xl64, align: right"]2[/TD]
[TD][/TD]
[TD="class: xl64"]C[/TD]
[TD="class: xl64, align: right"]14[/TD]
[/TR]
[TR]
[TD="class: xl64"]D[/TD]
[TD="class: xl64, align: right"]7[/TD]
[TD][/TD]
[TD="class: xl64"]D[/TD]
[TD="class: xl64, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl64"]E[/TD]
[TD="class: xl64, align: right"]10[/TD]
[TD][/TD]
[TD="class: xl64"]E[/TD]
[TD="class: xl64, align: right"]4[/TD]
[/TR]
[TR]
[TD="class: xl64"]F[/TD]
[TD="class: xl64, align: right"]1[/TD]
[TD][/TD]
[TD="class: xl64"]F[/TD]
[TD="class: xl64, align: right"]20[/TD]
[/TR]
[TR]
[TD="class: xl64"]G[/TD]
[TD="class: xl64, align: right"]4[/TD]
[TD][/TD]
[TD="class: xl64"]G[/TD]
[TD="class: xl64, align: right"]7[/TD]
[/TR]
[TR]
[TD="class: xl64"]H[/TD]
[TD="class: xl64, align: right"]5[/TD]
[TD][/TD]
[TD="class: xl64"]H[/TD]
[TD="class: xl64, align: right"]6[/TD]
[/TR]
</tbody>[/TABLE]


So in this case, if n=3, the bottom 3 value are F, C, B.
So the formula should sum F,C,B in sheet 2: 20+14+15= 49

Thanks in advance
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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