Formula that would roll forward the amount (netting the amounts)

jeongs1

New Member
Joined
May 23, 2017
Messages
44
So, with a help from great excel experts in this forum, I was able to get the formula that would give me the results for STEP 1. Now, I need help for STEP 2. F

or an example, I want ABC's Session 2 for Feb-17 to be the net value of from both Jan-17 and Feb-17, which would equal to ZERO. Then for Mar-17, ABC's Session 2 would become 12.

Another example would be for ABC's Session 3 for Feb-17 would be 230, netting/accumulating both Jan and Feb. Then for Mar-17, it would become 242, all of Jan, Feb, and Mar.

I feel like "<="&EOMONTH should be used somewhere, but not quite sure how and where I would insert it... Greatly appreciate any help!!!


A​
B​
C​
D​
E​
1​
17-Jan17-Feb17-Mar
2​
ABCSession 1-50
3​
ABCSession 2-151512
4​
ABCSession 33020012
5​
BCDSession 1400-300
6​
BCDSession 2-50100150
7​
BCDSession 3-50
8​
CDESession 116300
9​
CDESession 25010015
10​
CDESession 390-105

<tbody>
</tbody>



A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
12​
Input Sheet
13​
17-Jan​
17-Feb​
17-Mar​
14​
Session 1Session 2Session 3Session 1Session 2Session 3Session 1Session 2Session 3
15​
ABC-1530-50152001212
16​
BCD400-50100-50-300150
17​
CDE165090300100-10155

<tbody>
</tbody>


B15=INDEX($C$2:$E$10,MATCH($A15,$A$2:$A$10,0)+MATCH(B$14,$B$2:$B$4,0)-1,MATCH(B$13,$C$1:$E$1,0))
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
How's this?


Excel 2010
ABCDEFGHI
117-Jan17-Feb17-Mar17-Jan17-Feb17-Mar
2ABCSession 10-5000-50-50
3ABCSession 2-151512-15012
4ABCSession 3302001230230242
5BCDSession 14000-300400400100
6BCDSession 2-50100150-5050200
7BCDSession 30-5000-50-50
8CDESession 116300016316316
9CDESession 2501001550150165
10CDESession 390-105908085
Sheet1
Cell Formulas
RangeFormula
G2=SUM($C2:C2)
 
Upvote 0
That's not going to work since I have Data Sheet and Input Sheet in the format as above... I'd love to change the format around, but can't. :(
 
Upvote 0
That's not going to work since I have Data Sheet and Input Sheet in the format as above... I'd love to change the format around, but can't. :(

I assumed that you were showing us what you have already. Is that not the case?

I was basing my formula off of that top table. If you prefer to base the formula off of the bottom table, you can try this:


Excel 2010
ABCDEFGHIJ
1Jan-17Feb-17Mar-17
2ABCSession 10-50-50
3ABCSession 2-15012
4ABCSession 330230242
5BCDSession 1400400100
6BCDSession 2-5050200
7BCDSession 30-50-50
8CDESession 116316316
9CDESession 250150165
10CDESession 3908085
11
12Input Sheet
13Jan-17Jan-17Jan-17Feb-17Feb-17Feb-17Mar-17Mar-17Mar-17
14Session 1Session 2Session 3Session 1Session 2Session 3Session 1Session 2Session 3
15ABC0-1530-501520001212
16BCD400-5000100-50-3001500
17CDE165090300100-100155
Sheet1
Cell Formulas
RangeFormula
C2=SUMPRODUCT(($A$15:$A$17=$A2)*($B$13:$J$13<=C$1)*($B$14:$J$14=$B2)*($B$15:$J$17))
 
Last edited:
Upvote 0
Thank you!!!

Another quick question. Is there a way to do that with the below formula? Using "<="&EOMONTH inserted somewhere inside last MATCH? Just curious.

B15=INDEX($C$2:$E$10,MATCH($A15,$A$2:$A$10,0)+MATCH(B$14,$B$2:$B$4,0)-1,MATCH(B$13,$C$1:$E$1,0))
 
Upvote 0
Thank you!!!

Another quick question. Is there a way to do that with the below formula? Using "<="&EOMONTH inserted somewhere inside last MATCH? Just curious.

B15=INDEX($C$2:$E$10,MATCH($A15,$A$2:$A$10,0)+MATCH(B$14,$B$2:$B$4,0)-1,MATCH(B$13,$C$1:$E$1,0))

You're welcome. Happy to help.

My formulas are in C2:E10. They refer to the table on the bottom.

Are you saying that your formulas are in B15:J17 and refer to the top table?

I am confused as to where your data is vs where you want the results to be.
 
Upvote 0
Sorry for the confusion. Yes, my formulas would go in to B15:J17. The data is the very first table and I want the result to be in the second table where it's labeled as "Input Sheet".
 
Upvote 0
Sorry for the confusion. Yes, my formulas would go in to B15:J17. The data is the very first table and I want the result to be in the second table where it's labeled as "Input Sheet".

Alright, in that case try this:


Excel 2010
ABCDEFGHIJ
1Jan-17Feb-17Mar-17
2ABCSession 10-500
3ABCSession 2-151512
4ABCSession 33020012
5BCDSession 14000-300
6BCDSession 2-50100150
7BCDSession 30-500
8CDESession 1163000
9CDESession 25010015
10CDESession 390-105
11
12Input Sheet
13Jan-17Jan-17Jan-17Feb-17Feb-17Feb-17Mar-17Mar-17Mar-17
14Session 1Session 2Session 3Session 1Session 2Session 3Session 1Session 2Session 3
15ABC0-1530-500230-5012242
16BCD400-50040050-50100200-50
17CDE1650903161508031616585
Sheet1
Cell Formulas
RangeFormula
B15=SUMPRODUCT(($A$2:$A$10=$A15)*($B$2:$B$10=B$14)*($C$1:$E$1<=B$13)*($C$2:$E$10))


Note that I filled in the blank cells in row 13 with the correct month.
 
Upvote 0
It gave me "#N/A" :(

Then your layout (or data) must be different from the example that you gave because as you can see from post #8, it works fine for me.

Try copying and pasting the example from post #8 in a separate worksheet and see if you can get the formula working there before moving on to your actual sheet.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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