How to avoid #ref error while deleting the rows in Excel?
While you refer a cell to another cell, the cell will display #REF error if the reference row has been deleted as below screenshot shown. Now I will talk about how to avoid #ref error and automatically refer to next cell while deleting the row.
![]() |
![]() |
![]() |
Avoid #REF error while deleting the rows
Avoid #REF error while deleting the rows
To avoid #REF error, you cannot use the general formula =cell reference, you need another formula.
Select a cell next to the cell you need to use a formula to refer a row to it and type the row number difference between the cell and reference cell. For instance, I want to refer B12 to B2, then type 10 into C2. See screenshot:
The in the cell B2, type =OFFSET(B2,C2,), and press Enter key.
Now while you deleting the row 12, the cell content will be updated and get the value in new row 12.
![]() |
![]() |
![]() |
Relative Articles:
Best Office Productivity Tools
Supports Office/Excel 2007-2021 and 365 | Available in 44 Languages | Easy to Uninstall Completely
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need Is Just A Click Away...
Supercharge Your Excel Skills: Experience Efficiency Like Never Before with Kutools for Excel (Full-Featured 30-Day Free Trial)
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day! (Full-Featured 30-Day Free Trial)
