- To post as a guest, your comment is unpublished.· 21 days agoI just used this formula and was able to remove the double negative. Having 1 negative, made the result negative, having 2, made it positive -- so not sure why it is there, but afaik, its not needed.
How to sum numbers from 1 to n in Excel worksheet?
In Excel worksheet, we can use the SUM function to calculate a list of numbers quickly and easily. However, when you want to sum numbers from 1 to n, do you have any good formula to solve this task?
For example, I will sum numbers from 1 to 150, the following formula can do you a favor, please do as this:
Enter this formula: =SUMPRODUCT(--(ROW(INDIRECT(B1&":"&B2)))) into a blank cell where you want to get the calculated result, and then press Enter key, the numbers from 1 to 150 have been added up as following screenshot shown:
Note: In the above formula, B1 and B2 are the first and last number that you want to sum from.
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 3 years agoWhat does the "--" in the formula: =sumproduct(--Row(Indirect(B1&":"B2))) do to the formula?