A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Put the following formula and drag down -
=INDIRECT("A"&ROW()-1)+1
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have setup Cells A6 and down as a unique identifier with cell A7 equal to A6 + 1 and on down the line. This number is used for v-lookup formulas and other formulas. When I delete a row, I get a #REF in all cells below. Naturally this causes a bunch of problems down the line.
Is there some way to make excel automatically readjust the count above in the ID column? So, if cell A5 is deleted, A6 automatically readjusts to A4+1? Or, is it possible to eliminate the column and row number altogether and give each cell a pure relative reference? So, tell the cell (+1 to the cell above you); absolutely no reference to what that cell ref. actually is? This way, when I delete a row, Excel doesn't care?
VBA is not an option for me right now; sorry. (I want to learn it).
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Put the following formula and drag down -
=INDIRECT("A"&ROW()-1)+1
Thank you so very, very much! Please, explain to me how this works:
Am I right?
Thank you.
Your first cell needs to have a value and succeeding cells need to have this formula.
Suppose, you deleted row 4. Now row 5 becomes your new row 4. ROW() will become 4 now, ROW()-1 will be 3. Hence, you formula would translate to INDIRECT("A3")+1. Hence, it will add the value in A3 with 1 and put this value in row 4.