Dynamic range of column in sum range with criteria

jeetusaini85

Board Regular
Joined
Aug 9, 2013
Messages
131
Hi Guys,

I hope all is well at your end.

I need your help to create a formula that I am trying to create for 2 days and now I give up.

Below is the table in which column A has multiple same values and in B column the value will always be 0 in the first cell corresponding to column A and in 2nd cell of the B column will be a random value.

So, in column B3 I want to add 10 including B2 value and so on till the column A value change. Like, B3 would be 5+10=15, B4=5+15+10=30....

Hope, It makes sense, Please assist.

AB
10
15
1(B1+B2)+10=15
1(B1+B2+B3)+10=30
1(B1+B2+B3+B4)+10=50
20
210
2(B6+B7)+10=20
2(B6+B7+B8)+10=40
2(B6+B7+B8+B9)+10=80
30
36
3so on
3
3
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Maybe:

Book1
AB
1AB
210
316
4116
5132
6164
720
828
9218
10236
11272
1230
13319
14329
15358
163116
Sheet4
Cell Formulas
RangeFormula
B2:B16B2=IF(A2<>A1,0,IF(COUNTIF(A$1:A1,A2)=1,RANDBETWEEN(1,20),SUMIF(A$1:A1,A2,B$1:B1)+10))


The random number is an integer between 1 and 20, you can switch this if needed easy enough.
 
Upvote 0
Hi Eric,

I appreciate your help.

Working like a charm but what if column A has alphanumeric value like below, will RANDBETWEEN work on this as well.

LNETA03619-200014378
LNETA03619-200014378
LNETA03619-200014378
LNETA03619-200014379
LNETA03619-200014379
LNETA03619-200014379
 
Upvote 0
For more clarification, below is the actual table. You can see that i am calculating in AB4 column in which AA is also included, now I want to add AB3 to get the value in AB4 and so on till the column B value changes.

1588004262655.png
 
Upvote 0
I'm confused as to what you want. There is no issue if the data in column A is text or not, the formula handles it fine. Also, when you said "random number", is this a number you wanted randomly generated, or is it a number you want to enter and have the formulas handle? You now seem to be adding numbers horizontally and vertically. Can you explain how you want the sums to be created?

If possible, can you try to use the XL2BB tool? See the button in the response box. This will allow you to post a sample of your sheet that I can copy, so I don't have to manually enter all that data.
 
Upvote 0
Hi Eric,

Please find below the data and snapshot of the formula I am using.

You can see that I am calculating in U4 column in which column T is also included in the calculation sum, now I want to add U3 to get the value in U4 and so on till the column A value changes.

Please let me know how can I attach a sample XL file for your reference.

loan_noINSTL_DATEINSTL_AMOUNTPRIN_COMPINT_COMPRUNNING_NORMAL_INTINTEREST_RATENature of InstallmentNew Due DatePart Payment DatePart Payment AmountPart Payment Days
Mar-20​
Apr-20​
May-20​
Jun-20​
Jul-20​
Aug-20​
Total Moratorium Tenure
Mar-20​
Apr-20​
May-20​
Jun-20​
Jul-20​
Aug-20​
LNETA03619-200014376
20-03-2020​
11731500​
11427400​
304100​
304100​
13.25%​
BULLET REPAYMENT
20-06-2020​
31-03-202000
10​
0​
0​
0​
0​
0​
104317800000
LNETA03619-200014376
20-03-2020​
11631500​
11327400​
304100​
304100​
13.25%​
BULLET REPAYMENT
20-06-2020​
05-04-20201000005
0​
5​
0​
0​
0​
0​
50214850000
LNETA03619-200014376
20-03-2020​
11531500​
11227400​
304100​
304100​
13.25%​
BULLET REPAYMENT
20-06-2020​
15-04-202010000010
0​
10​
0​
0​
0​
0​
100426010000
LNETA03619-200014376
20-03-2020​
11431500​
11127400​
304100​
304100​
13.25%​
BULLET REPAYMENT
20-06-2020​
25-04-202010000010
0​
10​
0​
0​
0​
0​
100422330000
LNETA03619-200014376
20-03-2020​
11331500​
11027400​
304100​
304100​
13.25%​
BULLET REPAYMENT
20-06-2020​
15-05-202010000020
0​
0​
20​
0​
0​
0​
200084513000
LNETA03619-200014376
20-03-2020​
11231500​
10927400​
304100​
304100​
13.25%​
BULLET REPAYMENT
20-06-2020​
10-06-202010000025
0​
0​
0​
25​
0​
0​
2500010549900
LNETA03619-200014376
20-03-2020​
11231500​
10927400​
304100​
304100​
13.25%​
BULLET REPAYMENT
20-06-2020​
20-06-2020010
0​
0​
0​
10​
0​
0​
100004219900
LNETA03619-200014377
07-04-2020​
10300000​
10000000​
300000​
300000​
13.25%​
BULLET REPAYMENT
07-07-2020​
31-03-202000
0​
0​
0​
0​
0​
0​
0000000
LNETA03619-200014377
07-04-2020​
10200000​
9900000​
300000​
300000​
13.25%​
BULLET REPAYMENT
07-07-2020​
04-04-20201000004
0​
0​
0​
0​
0​
0​
0000000
LNETA03619-200014377
07-04-2020​
10000000​
9700000​
300000​
300000​
13.25%​
BULLET REPAYMENT
07-07-2020​
15-04-202020000011
0​
8​
0​
0​
0​
0​
80294440000
LNETA03619-200014377
07-04-2020​
9900000​
9600000​
300000​
300000​
13.25%​
BULLET REPAYMENT
07-07-2020​
25-04-202010000010
0​
10​
0​
0​
0​
0​
100364380000
LNETA03619-200014377
07-04-2020​
9700000​
9400000​
300000​
300000​
13.25%​
BULLET REPAYMENT
07-07-2020​
15-05-202020000020
0​
0​
20​
0​
0​
0​
200071888000
LNETA03619-200014377
07-04-2020​
9600000​
9300000​
300000​
300000​
13.25%​
BULLET REPAYMENT
07-07-2020​
10-06-202010000025
0​
0​
0​
25​
0​
0​
250008960100
LNETA03619-200014377
07-04-2020​
9600000​
9300000​
300000​
300000​
13.25%​
BULLET REPAYMENT
07-07-2020​
07-07-2020027
0​
0​
0​
0​
27​
0​
270000976590
LNETA03619-200014378
10-05-2020​
20000000​
20000000​
400000​
0​
13.25%​
BULLET REPAYMENT
10-08-2020​
31-03-202000
0​
0​
0​
0​
0​
0​
0000000
LNETA03619-200014378
10-05-2020​
19936622​
19900000​
400000​
36622​
13.25%​
BULLET REPAYMENT
10-08-2020​
05-04-20201000005
0​
0​
0​
0​
0​
0​
0000000
LNETA03619-200014378
10-05-2020​
19881267​
19700000​
400000​
181267​
13.25%​
BULLET REPAYMENT
10-08-2020​
30-04-202020000025
0​
0​
0​
0​
0​
0​
0000000
LNETA03619-200014378
10-05-2020​
19672139​
19600000​
400000​
72139​
13.25%​
BULLET REPAYMENT
10-08-2020​
10-05-202010000010
0​
0​
1​
0​
0​
0​
1007240000
LNETA03619-200014378
10-05-2020​
19471403​
19400000​
400000​
71403​
13.25%​
BULLET REPAYMENT
10-08-2020​
20-05-202020000010
0​
0​
10​
0​
0​
0​
100071666000
LNETA03619-200014378
10-05-2020​
19378138​
19300000​
400000​
78138​
13.25%​
BULLET REPAYMENT
10-08-2020​
01-06-202010000011
0​
0​
0​
11​
0​
0​
110007877400
LNETA03619-200014378
10-05-2020​
19374165​
19100000​
400000​
274165​
13.25%​
BULLET REPAYMENT
10-08-2020​
10-07-202020000039
0​
0​
0​
0​
39​
0​
3900002803630
LNETA03619-200014378
10-05-2020​
19310896​
19100000​
400000​
210896​
13.25%​
BULLET REPAYMENT
10-08-2020​
10-08-2020030
0​
0​
0​
0​
0​
30​
3000000218061

1588008447731.png
 
Upvote 0
Thank you for the copyable data. It seems to match up with your picture. There is no way to directly attach a spreadsheet on this forum. Your options are to use the XL2BB tool (best, but some places do not allow installing add-ons), or paste a range like you did here (which should be adequate), or to upload it to a file sharing service like DropBox and post a link here.

Given that I now have a copy of your data, I'm still confused as to what you want. I see that for every value in L2:R23, there is a matching value in T2:Y23, and I assume you want to sum them up in some manner. Could you manually calculate the desired values for T2:Y8 and explain in words how you arrived at those values?
 
Upvote 0
Hi Eric,

You can download the sample file from the below link, the actual output which i want is mentioned in the column AA to AF.

I hope this clarifies my requirements.

Thanks for your support in advance.

 
Upvote 0
Hi Eric,

I have integrated your formula with mine and got the desired results but need to check with you whether I have done right or wrong, please have a look:

in U3

=ROUND(($C3+SUM(T3:INDEX(T:T,MATCH(A:A,A:A,0)))+IF(A3<>A2,0,IF(COUNTIF(A$1:A2,A3)<>1,SUMIF(A$1:A2,A3,AU$1:AU2))))*$G3/360*N3,0)
 
Upvote 0
Please ignore previous formula:

=ROUND(($C3+SUM(T3:INDEX(T:T,MATCH(A:A,A:A,0)))+IF(A3<>A2,0,IF(COUNTIF(A$1:A2,A3)<>1,SUMIF(A$1:A2,A3,U$1:U2))))*$G3/360*N3,0)
 
Upvote 0

Forum statistics

Threads
1,215,454
Messages
6,124,933
Members
449,195
Latest member
Stevenciu

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