Double dependency dropdownlist in excel - excel

I have excel worksheet with :
three columns A, B, C with coloured animals:
cell D1 with dropdownlist with values: cat, dog, elephant, rabbit, lion
cell E1 with dropdownlist with values: yellow, red, white
Example data are like below:
A B C
---------------------------------------------------------
1 | cat yellow my loved yellow cat
1 | cat yellow my hated yellow cat
2 | cat red my favourite red cat
3 | dog white ugly white dog
4 | dog white elegant white dog
5 | elephant white beauty white elephant
6 | elephant yellow tiny yellow elephant
7 | rabbit red small red rabbit
8 | lion red red lion for my son
9 | lion white my pet lion white
Now in cell F1 I need to have the dropdown list dependent on values selected in cells in D1 and E1. So If you will select in D1 cat and in E1 yellow, you should have in F1 two options to select:
my loved yellow cat
my hated yellow cat
The solutions with one dependent column I do it:
Data -> Validation -> List -> in formula I paste:
=OFFSET($C$1,MATCH(D1,$A$1:$A$9,0)-1,0,COUNTIF($A$1:$A$9,D1),1)
But this filter only by animals and I have in dropdown three cats: my loved yellow cat, my hated yellow cat, my favourite red cat. But I need only yellow cats! Is method to create it like desctibed below?

Have a look here, there something very similar.
I think this is what you are looking for:
=IFERROR(INDEX(C1:C10, SMALL(IF(1=((--(D1=A1:A10))*(--(E1=B1:B10))), ROW(C1:C10),""), ROW())),"")

Related

Excel - matching multiple strings of two columns and turn true shared strings in third column

Example:
A1 B1
1 white dog black dog
2 big tall tall building
3 wood green wood
4 big house green wood
5 long way street
I want to turn C1 true if A1 has one string match or full string match of B1 else C1 turn false:
A1 B1 C1
1 white dog black dog true
2 big tall tall building true
3 wood green wood true
4 big house green wood false
5 long way street false
=SUMPRODUCT(0+ISNUMBER(SEARCH(" "&TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),LEN(A1)*(ROW(INDEX(A:A,1):INDEX(A:A,1+LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)+1,LEN(A1)))&" "," "&B1&" ")))>0
Regards

Excel sort by similar cell data

So I have this list of data that i need to compare 2 spreadsheets with. Im going to simplify it with a list like below(Column A being a part number, and column B being a quantity):
Spreadsheet 1:
Red 1
Blue 2
Green 1
Orange 6
Yellow 8
Spreadsheet 2:
Red 1
Green 1
Blue 2
Orange 6
Yellow 8
Silver 2
Brown 3
Now what i would like my output to be:
Red 1
Blue 2
Green 1
Orange 6
Yellow 8
Silver 2
Brown 3
Notice that im sorting it so that list 2 aligns with list one, and if list 2 contains things that are not on list 1 it puts it at the bottom(preferably vice-versa compatible). Im not sure if this is even possible, but if it is it will GREATLY decrease my workload so any help is MUCH appreciated. Thanks for your time!

Horizontal Index Match (returning column header)

A B C
1 Fruit Color Meat <- Column Header
2 Banana Red Pork
3 Apple Black Chicken
4 Orange White Beef
From the table1 above to table2 below:
A B
1 Name What? <- Column Header
2 Banana Fruit <- Formula should return these values, based on table 1
3 Red Color
4 Beef Meat
5 Pork Meat
Looking for a formula to return corresponding column name in B2,3,4...
I tried =INDEX(Table1[#Headers],MATCH(J:J,Table1,0))
It would seem that the three columns are unique; e.g. there would never be a Beef in the Color column. In that case you can simply query each column, passing back a 1, 2 or 3 as the case may be.
=IFERROR(INDEX(Table1[#Headers],
ISNUMBER(MATCH([#Name], Table1[Fruit], 0))*1+
ISNUMBER(MATCH([#Name], Table1[Color], 0))*2+
ISNUMBER(MATCH([#Name], Table1[Meat], 0))*3),
"no column")
    
I'm not sure whether Port was an intentional misspelling but it does demonstrate what occurs when there is no match.

How to extract a particular word from a cell in excel that matches a list of values

How to extract a particular word from a cell in excel from a list (array) of possible values and return that matched word.
I have a list of products, but I just want to know the color. The color is embedded in the products description, therefore I need to extract it out of the item description. Here is a brief example of a list the item descriptions:
CORNER CCP 26" BARN RED
CORNER CCP 28" KHAKI
CORNER CCP 28" SLATE GRAY
CORNER RS EZ ANTIQUE GRAY
CORNER RS EZ 26" ASHWOOD GRAY
CORNER,RSC EZ,AUTUMN CEDAR
CORNER RS EZ 26" BARN RED
CORNER RS EZ 26" CANARY YELLOW
CORNER RS EZ 26" COASTAL BROWN
CORNER,RS EZ 26" COASTAL CLAY
CORNER,RS EZ 26"COASTAL CEDAR
CORNER RS EZ 26" CYPRESS GREEN
CORNER RS EZ 26" CLASSIC WHIT
I want to then compare that Item description with a list of colors I have and then just return those color names.
Amaranth
Amber
Amethyst
Apricot
Aquamarine
Azure
Baby blue
Beige
Black
Blue
Blue-green
Blue-violet
Blush
Bronze
Brown
Burgundy
Byzantium
Carmine
Cerise
Cerulean
Champagne
Chartreuse green
Chocolate
Cobalt blue
Coffee
Copper
Coral
Crimson
Cyan
Desert sand
Electric blue
Emerald
Erin
Gold
Gray
Green
Harlequin
Indigo
Ivory
Jade
Jungle green
Lavender
Lemon
Lilac
Lime
Magenta
Magenta rose
Maroon
Mauve
Navy blue
Ocher
Olive
Orange
Orange-red
Orchid
Peach
Pear
Periwinkle
Persian blue
Pink
Plum
Prussian blue
Puce
Purple
Raspberry
Red
Red-violet
Rose
Ruby
Salmon
Sangria
Sapphire
Scarlet
Silver
Slate gray
Spring bud
Spring green
Tan
Taupe
Teal
Turquoise
Violet
Viridian
White
Yankees Blue
Yellow
Place the data in column A.
Place the list of colors in column B.
Place the following array formula in column C and fill down:
=IFERROR(INDEX($B$1:$B$86,MATCH(1,COUNTIF($A1,"*"&$B$1:$B$86&"*"),0)),"")
Note that this is an array formula. In order for it to operate correctly, first copy and paste from your browser window to Excel, then, with the same cell selected, click in the formula bar (or press F2) and press Control + Shift + Enter. There should now be braces around the formula.
If the string in column A contains more than one of the colors in column B, the first matching column B color will be listed.

Counting word "pairs" in excel between different columns

I'm wondering if it's possible to do this in excel:
Let's say I have these columns:
Column A | Column B
Apple | Red
Apple | Green
Pear | Green
Pear | Green
Is it possible for me to count how many times a set of "pairs" appears.
For example -
I want to count how many times "pear" and "green" appeared in my spreadsheet next to each other (not individually).
So for the above I should get:
Apples + Red appears 1 time
Apples + Green appears 1 time
Pear + Green appears 2 times
I tried using the COUNTIF function, but I don't think it can count a set of pairs like this...
If the above is possible... is it further possible to break down the data by time? For example, we have these columns:
Column A | Column B | Column C
3/7/2013 | Apple | Red
3/7/2013 | Apple | Red
3/8/2013 | Apple | Red
3/8/2013 | Pear | Green
3/8/2013 | Pear | Green
3/9/2013 | Apple | Red
3/9/2013 | Pear Green
If I want to organize the data by day, how can I do this? For example:
I want to display that on 3/7/2013, Apple + Red appeared 2 times, but on 3/8/2013, Pear + Green appeared 2 times and Apple + Red only appeared once.
Is it also possible to organize data by weeks or months this way? (During the month of January, I got 20 Apple + Red "pairs"
Let me know if anything was unclear in what I was asking
Thanks for your help!!!!
Add a new column to your data, which concatenates your data (ideally with delimiters to avoid value clashes) e.g. In Col D1 put formula
=A1&"|"&B1&"|"&C1
Give it a heading of Vals, and then create your pivot table from all the data
As an example I created this sample data which has 2 employees, Fred & Bill and a number of rows for each on 2 days. For 3-Jul, both Fred and Bill appear 3 times, but on 4-Jul Fred appears once and Bill 5 times.
My pivot table shows this result (which is hopefully what you're after)
EDIT :
For your situation, you probably need two extra columns, one called 'Pair Name' which concatenates B & C, and another called 'Pairs' which concatenates A, B & C.
Then in your pivot table you can drag 'Pair Name' into the Column Labels, and 'Pairs' into the Sum of Values.

Resources