Question posted 2010 · +16 upvotes
I am trying to do simple thing: I just need to set some cells to values that are on the previous rows.
I have tried =A(Row()-1) but it does not work.
Accepted answer +41 upvotes
To solve this problem in Excel, usually I would just type in the literal row number of the cell above, e.g., if I’m typing in Cell A7, I would use the formula =A6. Then if I copied that formula to other cells, they would also use the row of the previous cell.
Another option is to use Indirect(), which resolves the literal statement inside to be a formula. You could use something like:
=INDIRECT("A" & ROW() - 1)
The above formula will resolve to the value of the cell in column A and the row that is one less than that of the cell which contains the formula.
Top excel Q&A (6)
- Shortcut to Apply a Formula to an Entire Column in Excel +335 (2011)
- How should I escape commas and speech marks in CSV files so they work in Excel? +136 (2012)
- Convert xlsx to csv in linux command line +96 (2012)
- How to create a link inside a cell using EPPlus +50 (2011)
- IF statement: how to leave cell blank if condition is false ("" does not work) +44 (2013)
- T-SQL: Export to new Excel file +44 (2012)
excel solutions on this site
— top 4%.