What would be the proper syntax if the formula =SUM(A2:A(ROW-1)) in cell B5 is incorrect?

I have two columns of positive values with no decimals, A and B. I have these values in column A, starting with A2. Let's say A2 is 10, A3 is 20, and A4 is 5.

I want to use the following formula in the cells of column B to add the values from column A together: B3 would be the "sum" of A2 (10), B4 would be the sum of A2 and A3 (30), B5 would be the sum of A2 and A3 and A4 (35), and so on.

I always need to add up all the values in column A, from A2 up to the current row minus 1, which is why I created the above formula, but it is incorrect. The MS "help" that then opens up is also of no assistance, and I was unable to find any information online about "Excel SUM ROW" or similar functions.

I tried several different syntaxes, but they were all awful, such as =SUM(A2:A(ROW()-1)) and using [] in place of () around ROW-1.

Please let me know the correct syntax.
Nov 10, 2022 in Others 467 views

## 1 answer to this question.

A few explanations of why your formula does not work:

• A cell address consists of column letters and row numbers, but you can't just combine numbers and letters like that =SUM(A2:A(ROW()-1)).
• It is possible to construct a range reference as a text string and concatenate the text with the row number, like "A2:A"&Row()-1, but the result is just text. To turn it into a reference that can be used in a formula, you need to wrap it in the Indirect() function. Indirect() should be used sparingly, though, since it is volatile and can cause spreadsheets to become very slow.
• Excel cell references can use \$ signs to define absolute positions. Absolute references don't change when the formula is copied across or down. \$A\$2 will always point to cell A2.
• Relative cell references without the \$ can be used to achieve your goal. To get a better understanding of what the \$ signs do, read up on relative and absolute cell references, for example here.

I hope this helps you.

• 63,720 points

## MS Excel - SumProduct formula with Loop

1 I have 4 arrays of data where ...READ MORE

## Creating an Instagram bot with reading an excel file and posing on Instagram, but some of words can not be read properly

The (account name) test1 100 euro #mountain ...READ MORE

## Is there a maximum number of formula fields allowed in Excel (2010)

See http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010073849.aspx for limits on specs it doesn't indicate ...READ MORE

## Calculate Birthdate from an age using y,m,d in Excel

Hi To Calculate the date, we can ...READ MORE

## Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

## IF - ELSE IF - ELSE Structure in Excel

In this case, you can use nested ...READ MORE