Sum of cell range, given Number of cell range

ibmy

Board Regular
Joined
Mar 4, 2020
Messages
134
Office Version
  1. 2016
Platform
  1. Windows
Hi Mr Excel

What formula/vba should be in Column L & Column M ?
Given number of cell range in Column J
The data in Column H
Result in Column L is Sum while Column M is Sum of Absolute

Example : Given Number of cell range in J10 is 3. Sum the data in Column J upwardly in 3 cell range.
Result in Column L is 0 ( -0.2 + - 0.8 + 1 ) / =SUM(H8:H10) and Result in Column M is 2 ( 0.2 + 0.8 + 1 ) / =SUM(ABS(H8:H10))

Sample of 300k row data :
sample 3.xlsb
GHJLM
1BNo. RangeSumSum ABS
20.1
30
40200
5-0.3
60
70.1
8-0.2
9-0.8
101302
110.5
120.4
13-0.9
14-0.22-1.11.1
150
160
171
180.3
19031.31.3
200.1
Sheet2


Thanks in advance.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Thanks @Peter_SSs
The formula working great.

In my Excel version, Sum ABS need to hit CTRL+SHIFT+ENTER to get correct result or use SUMPRODUCT ( no need to hit CTRL+SHIFT+ENTER ).
sum absolute
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
Yes, I tend to often forget about C+S+E in older versions and even if I do remember I'm not always sure which formulas need it. 😎
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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