Filtering or updating the table screws up this formula for some reason

mikemck

New Member
Joined
Apr 23, 2016
Messages
26
I have a couple of excel sheets that I am using this formula in.

At the start of every month, I delete all but the first record of the table and paste in the new month's data.
This however screws up the formula and it ends up with completely different cell references. Filtering the data seems to do the same thing.

The forumula I'm using is: =IF(B2="","",IF(ISNA('Print ref'!B2),NA(),'Print ref'!B2-TODAY()&" Days remaining"))
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I'm deleting the rows, except for the very first row.

I delete the rows because there may be fewer or more records in the new month's data.
 
Upvote 0
Deleting rows can screw up formulas, either by changing the range or causing a REF error. Rather, delete the data
 
Upvote 0
This is a table that gets updated each month, and the other is a table that shrinks throughout the month.

Deleting the rows themselves means I don't end up with extraneous rows with no data in them.

The table expands if there is more data, so what I need is a way to automatically shrink the table if there is less data.
 
Upvote 0
I have suggested how to do this to avoid problems. Excel has over 1 million rows, a few "extraneous" rows here and there will not make much of a difference.

If you are concerned that you will have formulas showing stuff for empty rows, adjust the formulas so they only show answers if there is data to work on
 
Upvote 0
Okay, I got it. I wasn't clear myself on what I wanted to do until you suggested that last.

Here's what I have now: =IF(OR(ISBLANK(A2),ISBLANK(E2)), "",IF(B2="","",IF(ISNA('Print ref'!B2),NA(),'Print ref'!B2-TODAY()&" Days remaining")))

Thank you.
 
Upvote 0
Cool, nice job :)

maybe an adjustment to this?
=IF(OR(A2="",E2="",B2=""),"",IF(ISNA('Print ref'!B2),NA(),'Print ref'!B2-TODAY()&" Days remaining")
 
Upvote 0
Aha. Even better. This is excellent stuff.

Updated all of the formulas in these sheets along the same lines.

Just learned about dbl clicking the fill handle to update, made it all much easier as well.
 
Upvote 0
Great. Out of curiosity, what could be in 'Print ref'!B2 that would require testing for an error?
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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
Back
Top