Sum values between two specified cells in a single column

larsonsm

New Member
Joined
Nov 19, 2016
Messages
3
Hi all, I have two worksheets

IDSexAge1Age2
12Am213
12Bm613
12Cf59
12Dm28
12Ef911
12Fm813
12Gf1114
12Hm710
12If1115
12Jf412

<tbody>
</tbody>

and...

<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}@page {margin:1.0in .75in 1.0in .75in; mso-header-margin:.5in; mso-footer-margin:.5in;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}.xl64 {text-align:left;}.xl65 {color:windowtext; font-size:11.0pt; text-align:left; background:white; mso-pattern:black none;}.xl66 {color:windowtext; font-size:11.0pt; text-align:right; background:white; mso-pattern:black none;}.xl67 {color:windowtext; font-family:Calibri; mso-generic-font-family:auto; mso-font-charset:0; background:white; mso-pattern:black none;}.xl68 {color:windowtext; font-family:Calibri; mso-generic-font-family:auto; mso-font-charset:0; text-align:left; background:white; mso-pattern:black none;}--></style>
AgeY
11.11
27.26
37.32
45.74
51.57
69.47
76.26
88.37
90.26
106
116.97
123.12
139.12
145.44

<tbody>
</tbody>

From the first worksheet, I have two ages per subject, and I want to calculate the sum of Ys from the second worksheet between and including those two ages. Any Suggestions?<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}@page {margin:1.0in .75in 1.0in .75in; mso-header-margin:.5in; mso-footer-margin:.5in;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}.xl64 {color:white; font-size:11.0pt; background:#262626; mso-pattern:black none;}.xl65 {color:white; font-size:11.0pt; text-align:right; background:#262626; mso-pattern:black none;}--></style>
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I know you said 2 sheets, but you should be able to adapt this...
A​
B​
C​
D​
E​
F​
G​
H​
1​
IDSexAge1Age2AgeY
2​
12Am213
71.46​
1
1.11​
3​
12Bm613
49.57​
2
7.26​
4​
12Cf59
25.93​
3
7.32​
5​
12Dm28
45.99​
4
5.74​
6​
12Ef911
13.23​
5
1.57​
7​
12Fm813
33.84​
6
9.47​
8​
12Gf1114
24.65​
7
6.26​
9​
12Hm710
20.89​
8
8.37​
10​
12If1115
24.65​
9
0.26​
11​
12Jf412
47.76​
10
6​
12​
11
6.97​
13​
12
3.12​
14​
13
9.12​
15​
14
5.44​
G and H would be your 2nd table

E2=SUMIFS($H$2:$H$15,$G$2:$G$15,">="&C2,$G$2:$G$15,"<="&D2)
copied down
 
Upvote 0

Forum statistics

Threads
1,215,990
Messages
6,128,155
Members
449,427
Latest member
jahaynes

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