Sum between rows

Akbarov

Active Member
Joined
Jun 30, 2018
Messages
347
Office Version
  1. 365
Platform
  1. Windows
Hi community,

I want to know how can i calculate numbers between specific rows? if user selects January from data validation list i want excel to calculate numbers from January to august, if May than from May to August. btw user can select start and end date. so it can be from january to may etc.

Month names are in A1:A12
and numbers are in B1:B12

Can anybody help me to solve this problem please?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
If the Data Validation lists are in C1 and C2

=SUM(OFFSET(B1,MATCH(C1,A1:A12,0)-1,,MATCH(C2,A1:A12,0)-MATCH(C1,A1:A12,0)+1))
 
Upvote 0
You can try this:


Book1
ABCDEF
1Jan100Start DateEnd DateSum
2Feb1002-02-201906-07-2019270
3Mar30
4Apr90Start MonthEnd MonthSum
5May40FebJul270
6Jun50
7Jul50
8Aug90
9Sep40
10Oct30
11Nov40
12Dec70
13
Sheet3
Cell Formulas
RangeFormula
F2=SUM(INDEX(B1:B12,MATCH(TEXT(D2,"mmm"),A1:A12,0)):INDEX(B1:B12,MATCH(TEXT(E2,"mmm"),A1:A12,0)))
F5=SUM(INDEX(B1:B12,MATCH(D5,A1:A12,0)):INDEX(B1:B12,MATCH(E5,A1:A12,0)))
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,944
Members
452,539
Latest member
delvey

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