I have searched around but I can't find a short cut in formula.
A1 is an input cell. You can enter any whole number from 1 to say 1000. in column B501:B1500 are the data. I'd like to sum the first X (from A1) number of rows between B501:B1500
Example
if B501=20, B502=35, B503=12, B504=900, B505=125
Then if A1 = 2, the sum is 55
Then if A1 = 5, the sum is 1092
And if A1 = 3, the sum would be 67
I'm thinking in the line of sumif with a moving ranges in an array or sumproduct or with offset. My brain is a bit fried after a long week so any help is appreciated. Thanks.
A1 is an input cell. You can enter any whole number from 1 to say 1000. in column B501:B1500 are the data. I'd like to sum the first X (from A1) number of rows between B501:B1500
Example
if B501=20, B502=35, B503=12, B504=900, B505=125
Then if A1 = 2, the sum is 55
Then if A1 = 5, the sum is 1092
And if A1 = 3, the sum would be 67
I'm thinking in the line of sumif with a moving ranges in an array or sumproduct or with offset. My brain is a bit fried after a long week so any help is appreciated. Thanks.