Reference Error Workaround

Lisa928

Board Regular
Joined
Jun 13, 2002
Messages
173
I want to be able to delete rows (green, blue, purple; but these will always change) and have the simple calculation (previous row minus one) recalculate. When I delete them I get a reference error. Is there another calculation that I could us?

(I tried downloading the add-in to put in an Excel image, but Colo’s site is not working)

red 1
orange 2
yellow 3
green 4
blue 5
purple 6
black 7
white 8
brown 9


what I want
red 1
orange 2
yellow 3
green (deleted)
blue (deleted)
purple (deleted)
black 4 (were REF error)
white 5 (were REF error)
brown 6 (were REF error)
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Datsmart

Well-known Member
Joined
Jun 19, 2003
Messages
7,985
You will need to re-write the formulae when the reference row is deleted.
Are you doing the row deletion via code or manually?
If by code, you can include the formula re-write there.
 

Lisa928

Board Regular
Joined
Jun 13, 2002
Messages
173
delete them manually as they always change. I am okay writing good to redo formula, but just wondering if there was a different formula. This spreadsheet will be given to someone who is not that good at Excel so I was hoping not to have to include a macro.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,984
Messages
5,834,710
Members
430,311
Latest member
JAC0617

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top