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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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,224,745
Messages
6,180,699
Members
452,994
Latest member
Janick

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