FILTER formula that will hide blank rows.

lite4d

Board Regular
Joined
Jan 25, 2010
Messages
54
I have a spreadsheet that I want to filter data based on dates and the data will range from 3 rows to 120 rows based on the dates that are chosen. What I need to do is add something in the formula to shrink the rows to just the ones with data and expand with the data as required. My current formula is below:

=FILTER('Random Receipts'!A2:Q120,('Random Receipts'!K2:K120>=C3)*('Random Receipts'!K2:K120<=D3))

Right now I have to have 120 rows to cover for the data that "could" be there. I want it to shrink and grow as required. What do I need to add to my formula to get that to work?

I have tried a few things but nothing is working correctly. I just get the $spill error.

Thanks for the help as always!!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Are you putting the formula into a Table, or just a normal range?
 
Upvote 0
In that case if you are getting a #spill error it means there is something in the way of the formula, so you need to clear all the cells the formula is trying to spill into.
 
Upvote 0
I got the #spill error fixed now I need to get rid of the blank rows.
 

Attachments

  • FILTER FORMULA.jpg
    FILTER FORMULA.jpg
    243.4 KB · Views: 18
Upvote 0
What values do you have in col K & in C3 & D3
 
Upvote 0
In that case there should not be any blank rows.
Are you just putting the formula in a single cell & letting it spill?
 
Upvote 0
Yep. it filters perfectly but it does not shrink or grow as the dates are changed. An example, I have 3 rows per day and for the month I could have up t0 93 rows. If I only choose 1 day I only want to see three rows not 3 full and 90 empty. 2 days 6 filled 87 not......... Is that possible based on the current formula? If I try to delete only the first row I get the #spill error because the data has nowhere to go.
 
Upvote 0
I don't understand what you mean by this
If I try to delete only the first row I get the #spill error
The formula should only be in a single cell in that row, so if you delete it, there is no formula to give an error.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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