relational drop down in excel - excel

I have a drop down of 4 fields in Column A
In column B I have 10 fields which are associated to one of the 4 fields of column A
Similarly I have Column C, where the values are associated to one of the 4 fields of column A
How can I have a relation If I have 3 drop downs where I slect a Column "A" value it gives me related list in the next 2 drop downs.
please help

This is called dependent data validation. There are several possible approaches. Debrah Dalgliesh has a very good tutorial at http://www.contextures.com/xlDataVal02.html using named ranges and the Indirect() function.
If you need to populate two different drop-downs from one selection, call them Value1 and Value2 based on the Value in the first drop-down and use Indirect(A1&"1") and Indirect(A1&"2") respectively. Like this:

Related

Hey I have one column with multiple categories like a,b,c and other column with corresponding numbers to a,b,c , How can we calculate median

I have a table containing columns like category and values
I want to find the median of individual category I tried the "=median and if formula", it is working if I have two categories only if I have 3 like below data it does work, I want to do this without using pivot table actually that's a constrain
Categories
Values
a
5
b
4
c
9
c
10
b
6
a
2
c
11
b
7
a
3
b
8
I tried to formulate my requirement on the table but I guess there is some problem with the formula here
=IF(A2:A11="a",MEDIAN(B2:B11),IF(A2:A11="b",MEDIAN(B2:B11),IF(A2:A11="c",MEDIAN(B2:B11))))
Apart from this I tried the pivot table as well by using add measure it worked but I don't know why is it not working through formula
if you want to drag the formula then take unique categories and apply the formula.. in F2 cell
=MEDIAN(IF($B$2:$B$11=E2,$C$2:$C$11,""))
Your condition part of the if statement is returning an array. Don't use IF()...
You need to filter the column A.
=MEDIAN(FILTER(B1:B11,A1:A11="a"))
=MEDIAN(FILTER(B1:B11,A1:A11="b"))
=MEDIAN(FILTER(B1:B11,A1:A11="c"))
Try the following formula for spill down array. You do not need to drag down, no need to put formula to individual cells.
=LET(x,UNIQUE(A2:A11),y,MAP(x,LAMBDA(a,MEDIAN(FILTER(B2:B11,A2:A11=a)))),HSTACK(x,y))
You can achieve this using a Pivot Table, along with the build-in (Excel-2013 and higher) Power Pivot option to include your own measure:
Select your data, and in the 'Insert' tab, click 'Pivot Table' in the 'Tables' group;
Make sure to tick the 'Add this data to the Data Model' option and hit 'OK';
Then go to the 'Power Pivot' tab, (or enable it first if you haven't). Under the 'Calculations' group, click 'Measures' and choose to add a new one;
Choose an appropriate 'Measure name:' and use the following formula: =MEDIAN([Values]);
The Pivot Table should be selected, just click 'Categories' which will auto-populate the labels.

Excel Dependent Lists with duplicates

My problem is the following:
I have multiple columns i want to make dependent lists of, but i have duplicates in the first 3 columns. I am able to make them dependent, but all the duplicates show up in the dropdown.
For Example:
You can see, the First column has duplicates and so does the second.
This is what i have tried.
Made the Product Category list as a List under Data validation using the uniques only.
Used the Offset, match formula to make the Sub-Product ID as a dependent list on what is selected in the cell before it for Product category.
When i do No. 2, say i chose A1 in the Product category, i end up getting 100,100 in the drop-down. I only want one iteration of 100 to be in the dependent dropdown.
Formula Used: =OFFSET(Second!E5,MATCH(C3,Second!$D$6:$D$282,0),0,COUNTIF(Second!$D$6:$D$282,C3))
Please help.

Is it possible to populate two columns simultaneously?

I have a lookup table with three columns:
ID Brand Product
1 Dell Computer
4 HP Printer
I have to fill one more table as follows :
ID Product Brand
1
On click of Product the following formula: =VLOOKUP(A2,$E$4:$G$7,3,FALSE) will populate the Product as Printer. I want the corresponding Brand also to be populated on click of Product. The value to be populated should be HP.
I tried using the formula =VLOOKUP(A2,A3,$E$4:$G$7,3,2,FALSE) but it says Too many arguments.
Is it possible to populate two columns simultaneously?
If not possible using VLOOKUP, is there any other way of populating multiple cells by clicking on some other cell?
One way to populate multiple cells by a single click is to use a Form Control. In the example, G2 is populated with:
=IF($A3,VLOOKUP($A3,$A:$C,COLUMN()-5,0),"")
with this copied across to H2.
In 'A3' is a Check Box linked to A3:
A single click on the Check Box should then display:
You cannot populate a cell with a formula in another cell. You need one formula for Product and another formula for Brand.
For Product you have =VLOOKUP(A2,$E$4:$G$7,3,FALSE), which returns the value in the third column of the lookup table.
For Brand you want to return the second column of the lookup table. Therefore, you need this formula in the Brand column:
v-- This is the column you want to return
=VLOOKUP(A2,$E$4:$G$7,2,FALSE)
You could concatenate two VLOOKUPs and have both values in on cell like so:
=VLOOKUP(A2,$E$4:$G$7,2,FALSE)&" "&VLOOKUP(A2,$E$4:$G$7,3,FALSE)

Excel formulas and conditional lookups based on multiple criteria and sheets

I have 2 sheets:
sheet_a is a styled print-ready layout for a single data record
sheet_b is a bulk data table which is continually growing. Each row corresponds to a single complete record
Currently I am using a VLOOKUP to collect the data from sheet_b and put it in the respective cells in sheet_a. I have a drop down list on sheet_a which allows me to select a single record at a time to view.
Now I want to introduce a second drop down list to sheet_a where I want to select 1 of 4 specific conditions relating to the value of a cell in a specific column of each record on sheet_b.
I only want the entries that meet this condition in sheet_b to be made available in the range of records I can view on sheet_a.
Can anyone help?
As I understand it, you are looking for a way to filter the list that is used in the drop-down on Sheet_A.
add a column to the source data and calculate or mark manually which of the four conditions the record belongs to.
on Sheet_a add a drop-down field where the user can select from the four conditions. Name this cell "criterion"
in the source data table, add a column with a formula that returns the row number if the current row matches the selected criterion. Something like this copied down
=IF(B2=criterion,ROW(),"")
create another helper column that contains only the items that match the criterion using a formula like this and copied down
=INDEX(Data,SMALL($E$2:$E$18,ROW(A1)))
use a dynamic range name called "FilteredList" that contains only the values of the result list, not the errors. The formula for "FilteredList" is
=Sheet1!$F$2:INDEX(Sheet1!$F:$F,MATCH("zzzzz",Sheet1!$F:$F,1))
change the drop-down that is currently used to select a record to source its values from =FilteredList

Filter on comma separated list

I have an Excel spreadsheet that has the following data in column A. I am using Data Validation to allow only a list selected from a source that contains, in my case, CatA, CatB, and CatC.
A1: Categories (header)
A2: CatA, CatB
A3: CatC
A4: CatA, CatB, CatC
Currently if I use the filter option, it presents each of these as separate filter selection choices. Is it possible to list only the options in my source (CatA, CatB, CatC) and then display, for example, columns A2 and A4 if I were to select "CatA"? I would like to retain the functionality in the single column and maintain the existing values in the column rather than break them into separate columns if possible.
FYI, I am using this reference to Select Multiple Items from Excel Data Validation List in order to set up the ability to create the data in the column.

Resources