Filter Function: Return single row while looking at entire array?

Mplz

New Member
Joined
Jul 19, 2024
Messages
12
Office Version
  1. 2016
Platform
  1. Windows
Hello all. I have a data set that keeps track of individuals metrics for the calendar year. I would like to be able to search for a specific person, and return all dates and values that are over 0. Below is an example of my data set. I am trying to get the formula to spit out the dates and numbers for any instance where the value is greater than 0, and matches the name in the search field.

Using this function (=FILTER(D11:J15,D12:J12>0,""), I can get all values greater than 0, but it seems to me like you would want to have the whole array in the "include" portion of the formula because this is currently only giving me when the first person has values > 0. I can also get all values for the person in the search box using "D11:D15=M11" in the include portion, but when I try and combine the two using (D12:J12)*(D11:D15=M11) I get a Value error. Plus it also seems like even if it did work that would only give me the values for the first person since the array doesn't include the entire data set.

The goal would be to input the name in M11, and have it spit me out the dates at the top of the column as well as the value where the value is greater than 0.

Is there a way to use ChooseRow or something similar? Any help would be appreciated!


Attendance Draft Final Test v1.xlsx
DEFGHIJKLM
111/1/20251/2/20251/3/20251/4/20251/5/20251/6/2025Name:Bob Jones
12Bob Jones000.33010
13Jon Smith0.500100
14Gary Neuman010000.5
15Jack Gray000010
Sheet1
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Something like this?
Book1
DEFGHIJKLM
111/1/251/2/251/3/251/4/251/5/251/6/25Name:Bob Jones
12Bob Jones000.330101/3/250.33
13Jon Smith0.5001001/5/251
14Gary Neuman010000.5
15Jack Gray000010
Sheet3
Cell Formulas
RangeFormula
L12:M13L12=LET(f,FILTER(E12:J15,D12:D15=M11),TRANSPOSE(FILTER(VSTACK(E11:J11,f),f>0)))
Dynamic array formulas.
 
Upvote 0
Solution
Something like this?
Book1
DEFGHIJKLM
111/1/251/2/251/3/251/4/251/5/251/6/25Name:Bob Jones
12Bob Jones000.330101/3/250.33
13Jon Smith0.5001001/5/251
14Gary Neuman010000.5
15Jack Gray000010
Sheet3
Cell Formulas
RangeFormula
L12:M13L12=LET(f,FILTER(E12:J15,D12:D15=M11),TRANSPOSE(FILTER(VSTACK(E11:J11,f),f>0)))
Dynamic array formulas.
Incredible, you are a genius. This works perfectly!

If you are able can you help me wrap my head around the formula? I think I understand the first part, Let is defining "f" as the array filtered by name, but what is the calculation portion of the function doing? Transpose is changing it from horizontal to vertical I assume, how is the second filter with Vstack working? You are putting the Dates at the top together with "f" that you defined earlier and then filtering out everything > 0?
 
Upvote 0
If you are able can you help me wrap my head around the formula?
You can only FILTER 1-dimension at a time, either row or column.
The first FILTER filters for the row that contains the name.
VSTACK attaches the date row
The second FILTER filters columns where >0
Lastly, TRANSPOSE is as you say.
 
Upvote 0

Forum statistics

Threads
1,225,619
Messages
6,186,049
Members
453,335
Latest member
sfd039

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