Array formula having unique values for Data Validation dropdown without using helper column - arrays

I am trying to create an array defined name to enter into a data validation dropdown without using any helper columns in the sheet.
I have a table containing one of the column headers called 'List' which contains names of employees. The names may be duplicated, hence I want to extract only the unique names and put them into a data validation dropdown. I don't intent to use VBA and don't want to use any helper columns to drag the formula down to populate the unique names. On pressing F9, the formula should return unique values in an array like this:
{tom;fawad;george;jane;mario;flavia}
The table column looks like this:
List Column 2 Column 3 .....
tom
fawad
george
george
jane
mario
flavia
mario
george
fawad
Right now the formula is returning only one value when pressing F9 key.
=INDEX(list,IFERROR(SMALL(IF(FREQUENCY(MATCH(list,list,0),ROW(INDIRECT("1:"&COUNTA(list)))),ROW(INDIRECT("1:"&COUNTA(list))),""),ROW(INDIRECT("1:"&COUNTA(list)))),""))
I think it may require TRANSPOSE or SUBSTITUTE function to split the returned values across dropdown rows. Someone had demonstrated something like this, but I don't remember the link now.
Anyone know how to create a unique names array formula that I can simply enter directly into a Data Validation dropdown?

Related

Populating Cells Based on Dropdowns in Google Sheets

Alright. I'm setting up a character sheet for a D&D esque combat system for something. I have a chart with two columns; A and B. We'll call this Sheet1. Column A is trait names, column B is their corresponding descriptions.
On a separate sheet, Sheet2, I have a data validation drop down in column B corresponding to the trait names in column A on Sheet1. I need Sheet2, column C to auto populate with the trait description from Sheet1 column B corresponding to the selected trait from the drop down.
I have googled this with every possible change of phrasing I can think of and I cannot find a solution. If I could get Google sheets to understand Python I'd be golden and have this done already, but sadly I cannot. Can anyone help? I thought about just daisy chaining =(IF)'s but theres going to be about 50 different traits to choose from and that's just not efficient.
try:
=INDEX(IFNA(VLOOKUP(B2:B, Sheet1!A:B, 2, 0)))

How to count the particular values in the field in Google Data Studio

I am trying to create a simple table in Google Data Studio, which fetches data from MySql table. For example,
"Peter
John
Mike
Peter
George
Peter"
The above are the set of values in a field,
Here I have to count the number of "Peter" in the field and display the count.
Is it possible to display the count of particular values from a single field? If so, what function should I apply to get the required output?
I would suggest using a REGEXP_MATCH function to create a new field. Try this:
Create new field called Peter Count and use this formula:
CASE
WHEN REGEXP_MATCH(FIELD_NAME, "Peter") THEN 1
ELSE 0
END
Make sure the new field has a field type of Number and aggregation of SUM
Create a scorecard in your report and select your new field as the metric.
That should add up the occurrences of Peter and ignore other names.

Excel - Retrieve value in an array

In my organisation, there are a couple of excel functions that return large array like more than 2000 rows and several columns.
Dummy Code / Dummy Example :
{=FunctionThatReturnArray(param1)}
where param1 is the date
I need to retrieve the selling price for the combination « Shoes » « Yellow » for different dates.
I don’t want to display an entire array, for every date I’m interested in.
Instead, I would like to display only the value that I need.
I tried to used the Index function as below, but as the combination Shoes/Yellow isn’t always at the fifth row, it doesn’t work.
{=INDEX(FunctionThatReturnArray(param1),5,4)}
where 5 is the RowNumber and 4 the ColNumber
I believe I need to use the Match Function somehow, but on the 2 different column.
How could I do that without displaying the entire array on my worksheet ?
Thanks in advance and kind regards
Largo
I'm not sure if this is the answer you want, but you are right, you would have to match on both the 2nd and 3rd columns then index into the 4th column like this:
=INDEX({43466,"Pants","Yellow",40;43466,"Shirt","Green",20;43466,"Shoes","Blue",70;43466,"Shoes","Yellow",75},MATCH(1,
(INDEX({43466,"Pants","Yellow",40;43466,"Shirt","Green",20;43466,"Shoes","Blue",70;43466,"Shoes","Yellow",75},0,2)=B2)*
(INDEX({43466,"Pants","Yellow",40;43466,"Shirt","Green",20;43466,"Shoes","Blue",70;43466,"Shoes","Yellow",75},0,3)=C2),0),4)
Where I have used an array constant to test it, you would need multiple references to your Array Function to achieve this.
BTW the 43466 is the number representation of 1/1/2019.

How to create vertical tablix in sql server reporting services?

Hi to all i will try to tell you what i tried to do with an example. I have table as shown below;
#|a |b |c |
1|x1|y1|z1|
2|x2|y2|z2|
3|x3|y3|z3|
I want to create dynamic tablix for each row like below;
a|x1|
b|y1|
c|z1|
a|x2|
b|y2|
c|z2|
.
.
.
.
nth tablix.
I defined a dataset for a tablix. i defined the column names as row names(in the example they are a, b, c). and i can get the cell values by defining an expression like =First(Fields!x1.Value, "dsDetails") for each row. But i can not figure out how to generate dynamic tablix for remaining rows. I need suggestion to continue.
For others searching this kind of issue, there is a solution.You can create a tablix with two columns. First column will have the label you want to report and second column will have the information. The information can be displayed by inserting placeholders. An example table have been inserted below.
Example
If you inserted the table into a list. The report will be displayed for each row number.
PS: I fould this information on the internet. Therefore credits will go the the related person. This is just for the answer to be viewed here.
Another option is to use List control with Rectangle inside placing all columns of your dataset as separate textboxes inside that rectangle as it's shown in this video:
Using Lists in SSRS

Vlookup array multiple columns

Excel wiz's,
I'm trying to build a report with a simple drop down list of names. Rather than try to explain in more detail, let me give you a sample dataset:
Table1:
Text Person1 Person2 Person3
String here contains name(s) Mike Smith Robert Johnson Suzy Q
Another string with name(s) Dan Boy John Michael Bob Wise
Different string with name(s) Robert Johnson Suzy Q
In my report sheet, I have a drop down list of all the possible "persons" that I want to chose from and then return all values from the "Text" column in an array. I have been able to make it work with only one column using this formula, where C4 contains my choice in the dropdown list:
INDEX(Table1[#All],SMALL(IF(Table1[Person1]=$C$4,ROW(Table1[Person1])),ROW(1:1)),1)
The text column will contain all the names of the Person columns, but they are in a different case (all caps, can't change format for display purposes). Maybe a SEARCH function would be more useful? I'm not sure. I'm trying to avoid using a macro, but I am not completely opposed.
Let me know what you guys think, and thanks in advance!
Simply re-organize your table so that there's one row per name... the V-Lookup on the name and get the matching list.
Person Text
Mike Smith String with names
Robert Johnson String with names
Suzy Q String with names
Dan Boy Second string with names
are you trying to make validations for teams? like select team, then next drop down gives only members of that team?
you can use offset inside validation. in one cell put a validation for the list of teams. in the other cell, create a list validation, use a offset formula to return the range of members based on the selected team.
edit: not sure how to put in a table, but this is how you would fill a range with vlookup
in the table with the entries, add a column with serial number starting from 1-n
just below the drop down box, enter numbers 1 to n in order
vlookup the serial number in the table, that is the row you are looking up
for the column, use a match to look in the table which column the current selected person is
drag the formula down to fill n numbers

Resources