EXCEL: How to extract a subarray from a column based on the values of another column? - excel-formula

I'm working with a table that contains information about categories of products and oracle tables related with such products. Just like this:
I was trying to figure out how to extract in another location the tables used by each product using a dropdown list, for example:
If any of the product is selected from the dropdown list the tables marked by an X in the previous table must be shown as in the red square.
I was trying using INDEX, XLOOKUP, FILTER and combination of them unsuccessfully
Somebody can help me to figure out how to obtain the desired result?
Thanks in advance.

you can use this formula - I named the table data
=LET(getColumn,FILTER(data,data[#Headers]=H3),
FILTER(data[Table],getColumn="x"))

Using INDEX/MATCH in the FILTER:
=FILTER(Table1[TABLE],INDEX(Table1[#Data],0,MATCH(H2,Table1[#Headers],0))="x")

Related

Using XLOOKUP when dynamically assigning rank to a table does not pull the correct data

The issue I am having is trying to use XLOOKUP on a table column that has been generated using a ranking formula.
The Rank column is created using the following formula so that it adjusts dynamically depending on the visible columns (auto-filtering) since RANK.AVG or EQ does not take that into account.
=SUMPRODUCT(SUBTOTAL(3,OFFSET(Table2[[#All],[Sales]],ROW(Table2[[#All],[Sales]])-MIN(ROW(Table2[[#All],[Sales]])),0,1)),--([#Sales]<Table2[[#All],[Sales]]))
The XLOOKUP I am using is simple
=XLOOKUP(1,Table2[Rank], Table2[Rep])
The idea is that the field at the top would show the top ranked performer based on the visible rows. The problem is that when filtering the data, the rank column adjusts as it should, but the XLOOKUP does not function as I would expect. It sticks with the originally ranked 1 or even does something complete weird that I can't explain when running combinations of filters in the region column..
Anyone have any advice how I could better structure this to make it function in the intended manner. Any help at all would be appreciated.
You'll need to employ a similar construction to account for visible rows only, for example:
=LOOKUP(1,QUOTIENT(0,SUBTOTAL(3,OFFSET(INDEX(Table2[Sales],1),ROW(Table2[Sales])-MIN(ROW(Table2[Sales])),))*(Table2[Rank]=1)),Table2[Rep])
Not sure why you're referencing the table header row in your other formula.

Excel - How to look up data in a pivot table and use the values in the next cell?

I have a Pivot table like this
I try to convert this to a user table with all names and have the data listed by day
I tried to use VLookup bus not being succesfull in separating the code in a column structure.
Apologies for the pictures I tried to add a table structure but it didn't work out.
Any suggestions please?
My approach is to isolate regions based on the date you provide, then vlookup on that area, here is the formula, you can try:
C18==IFERROR(VLOOKUP($B18,INDEX($B$3:$B$15,MATCH(C$17,$B$3:$B$15,0)):INDEX($C$3:$C$15,IFERROR(MATCH(D$17,$B$3:$B$15,0),13)),2,0),"")

How can you extract data from a pivot table using DGET function in excel?

Im having this difficulty with the following pivot table where I want to use the =DGET function to extract all the names of the students who passed the exams in 2019 and make a list out of it.
As you can see in Cell G81 I tried putting the function =DGET(A74:D157;"1";F81) but unfortunately I'm afraid im not referencing it right. Is it possible to use =DGET on pivot table and pull info's based on two criteria?
The answer is NO, as DGET function can only return single value, and it will throw a #NUM error if more than one record matches criteria.
Judging from your pivot table, I believe you have a source table that contains the names of students who have passed the exam in 2018 and 2019. There are multiple ways to find a list of name from that source table using formula or use another pivot table (which is quicker).

Microsoft Excel get Count of Distinct Values

I am trying to use excel to get a count of distinct values, the following screenshot will illustrate what I am trying to do. Data Screenshot
Given data in the form on the left column I would like a way to display the occurrences of each distinct value on the right.
I have used the Outline Subtotal grouping to do this but it does not present the data in a form I can work with. I am by all means an Excel novice, any help would be appreciated
Thanks!
Use a pivot Table. Put the column in both the Rows and Values:

excel data validation using single criteria in table

This seems a straightforward requirement but I'm struggling to find an answer.
I have a simple table with a column listing product codes and another column listing whether it is active or not.
On a separate sheet, I want to use data validation to only list those products which are active.
I have found a number of examples which would require an initial selection of Yes/No for the status, which would then filter the list but I just want the list pre-filtered to show only the active products.
Is there a formula I can use in Data Validation which allows a preset criteria?
Thanks for any assistance.
After a bit more research I found the answer using OFFSET, MATCH and COUNTIF.
With a data validation type of List, the following formula only displays the rows where cell to the left (range named Active_Prod in this case) says Yes.
=OFFSET(Active_Prod,MATCH("Yes",Active_Prod,0)-1,1,COUNTIF(Active_Prod,"Yes"),1)
Hopefully this is of use to others.

Resources