Filter array with formulas

ES407

New Member
Joined
Nov 21, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
So I am using a filter array for a sheet with construction material. Basically I have all materials listed and the filter takes all materials from the list with a value in the Quantity row and plugs it into another sheet that I use to print a purchase order from. In this material list, I have "sections" of types of materials, and at the end of each section I have a formula "=IF(SUM(G44:G48)>0,"-","")". Basically, if nothing is ordered from that section, the cell is blank and if there is a quantity for any item in that section, the formula returns a hyphen(-). I have this so that on my purchase order page, the sections are still broken up and not just a continuous list.

My issue is that I sometimes have no materials for multiple sections but my Filter recognizes the formula (for entering the hyphen) as a value and gives me a blank row on my purchase order worksheet (sometimes upward of 20+lines, if I skipped 20 sections).

Is there a way to omit formulas that return a blank cell or a way to have a blank row added to a material section with any value in my filter results?

Attachment shows my Filter, where each blank row represents a line that has the above mentioned hyphen formula between sections. Any and all help would be appreciated.
 

Attachments

  • EXCEL.png
    EXCEL.png
    41 KB · Views: 16

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Which column has the formula in it?
Also can you please post your existing formula.
 
Upvote 0
So I actually have the
Which column has the formula in it?
Also can you please post your existing formula.
so I have the formula in all columns as you can see in the results (this isn't needed, just thought it looked better on the results. The formula pulls from the quantity row in each "material section", which is row G on the sheet my filter pulls from.

Ideally, I'd prefer to have each "section" with material being ordered to have a blank row below it to separate it from the next "section" with a value but that kind of defeats the filter funtion, unless there is a work around.

I'd be happy with anything that doesn't leave me with multiple blank lines though
 
Upvote 0
And the formula?
Oops, sorry.

=SUBSTITUTE(FILTER(FILTER(PIERS_HEADERS[[Piece Mark]:[Notes]],PIERS_HEADERS[Qty]>0),{1,1,1,0,0,1,1,1,1}),"","")

I use a substitute function to clear out the zeros and a second filter to eliminate 2 columns I don't need shown but the base formula starts at the second FILTER and ends after the ">0)"
 
Upvote 0
Thanks for that, how about
Excel Formula:
=CHOOSECOLS(FILTER(PIERS_HEADERS[[Piece Mark]:[Notes]],(PIERS_HEADERS[Qty]>0)*(PIERS_HEADERS[Qty]<>"")),1,2,3,6,7,8,9)
 
Upvote 0
Solution
Thanks for that, how about
Excel Formula:
=CHOOSECOLS(FILTER(PIERS_HEADERS[[Piece Mark]:[Notes]],(PIERS_HEADERS[Qty]>0)*(PIERS_HEADERS[Qty]<>"")),1,2,3,6,7,8,9)
You, Sir or Madam, are a god dang magician/miracle worker!

Works absolutely perfect and I thank you for your help! I hope you have an awesome weekend!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

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