I do not know how to explain this perfectly without a picture so please take a look at the image before reading.
I am trying to filter the data in Fig 1 (Above). based on the headers and then if the numbered column within that header is not 0 or blank. However, I also need the data from column A to be included in this filter.
For example, Take a look at the header "Bike" in column H. I want to be able to filter the data from only column H and column I because its within the "Boat" header. Then, I also need the blank cells and cells with 0 to not be included in the filter.
In the end it should look like Fig. 2 (Below) after it is filtered. I have tried doing filter if, just filter, etc. and still have not been able to figure it out. If I have to change my format as well let me know.
Thank you so much in advance!
Best Answer
No problem. Using the above formula you can target and filter each and every column in the query. Keep any or all of them according to your needs.
You would need the use of the
QUERY
function.Using a "helper" cell e.g.
B11
try the following for a more dynamic result:To completely automate the process, using
Data validation
, create a drop-down on cellB11
, set criteriaList from a range
and pick the headers (B2:I2
).Functions used:
MATCH
QUERY
IFNA