Making a combined file name from several drop down lists - string

I am trying to figure out how to use Excel, or some other means, to create a name generator. So for example, you choose (from a drop down list I pre-define) several attributes then it spits out a name I can then copy and paste when saving my file.
For example:
I select Room 25, on floor 11, of building A in Orlando campus, it would spit out:
ORL-A-1125
Is this something excel is capable of? If not, can anyone recommend an alternative application or approach and how to go about it?

Yes that is possible in Excel. You need to arrange your list entries in columns and the shorter codes they translate to in an adjacent column. You need a pair of columns for each section.
Choose a cell for the dropdown and right click it. Go to Data | Validation | Allow | List. This lets you define the range of cells that the dropdown gets it's entries from. Do that for each of your four sections.
Beneath each dropdown you then need to use the "VLOOKUP" function that looks up the value your dropdown has selected and returns the value 1 column to the right.
Finally write a formula to concatenate the four sections into a single string and you've got your filename.
https://support.office.com/en-us/article/create-a-drop-down-list-7693307a-59ef-400a-b769-c5402dce407b
https://support.office.com/en-gb/article/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1

Related

How can I make a drop down list in Excel 2013 based on several conditions?

What I would like to achieve is that sellers can choose the STORE in the blue cell (either with a drop down list or by hard-typing the STORE name) and, based on the selection on the blue cell, the available POSITIONS for that particular PRODUCT and that particular STORE are show in the green cell as a drop down list.
Let's say I have an Excel workbook, which contains a worksheet with this table with products data, which is automatically imported daily from our Nav server with this layout. It has 4 columns including PRODUCT CODE, DESCRIPTION, STORE IN WHICH IT CAN BE LOCATED and POSITION INSIDE DE STORE (please, check screenshot). It contains 1.5k rows and it changes dynamically, for example, new items are added or positions are exchanged.
As you can see, the same product (PRODUCT 2) can be located in several stores (STORES 1, 2 and 3), and it can be in several locations on each store (POSITIONS 2, 3, 1 and 4).
Now I need sellers to report which of these items they pick and from where, not only the STORE but its POSITION inside the store too. They do it with another worksheet inside the same Excel workbook. It looks more or less like this (please, check screenshot).
I know the drop down list is achieved via Data Validation but I can't figure out the formula for this. I have tried several approaches like:
Array formula to return all POSITIONS in the same ROW, following this (Formula 2.): https://www.ablebits.com/office-addins-blog/2017/02/22/vlookup-multiple-values-excel/. It is quite slow to calculate on the 1.5k items and, once done, I can't figure out how to make Data Validation to look for the 4 or 5 or 10 POSITIONS returned by the array formula, which also need to be filtered by STORE (please, check screenshot for the closest that I have been, array formula returning POSITIONS from column E).
Same formula as above directly on the Data Validation list box, which returns only the first POSITION found.
VBA custom fucntions which are not allowed in the Data Validation box.
I feel comfortable with both Power Query and VBA, and forumla as well, and can adapt most of the code I see but I don't know why I just can't figure out how to achieve this, maybe it is only I am blocked or something but every path I start to follow ends up in a dead end.
Does anyone have an idea on how to approach this? It doesn't really seem that complicated but it is becoming impossible for me.
Thank you very much for your time!!
This is what I have finally done, just in case someone else is facing this situation.
Instead of a plain-text table for the POSITIONS, I created a PowerQuery importing that CSV. Named that worksheet _LOCATIONS.
Added a custom column (Column E) combining the PRODUCT and the STORE so I had something like a Unique Identificator, resulting something like this but in PowerQuery.
Combined column:
Sorted column E and sub-sorted column D, so I make sure the list will always be ordered as I need, and saved the query.
Then, in worksheet REPORT, I entered this formula to create the drop down list in Data Validation in cell D2:
OFFSET(_LOCATIONS!$D$1,MATCH($A2&"-"&$C2,_LOCATIONS!$E:$E,0)-1,0,COUNTIF(_LOCATIONS!$E:$E,$A2&"-"&$C2))
And I am able to choose from the available POSITIONS for the selected PRODUCT in the selected STORE.
Brief explanation:
I set the reference for the OFFSET function in the very first POSITION (D1), and then I move it the amount of rows detected by the MATCH function (which searches for the "PRODUCT 2-STORE 2" string in the newly created combined column) minus 1 (PoweryQuery table has headers) and 0 columns. This leaves me on the first occurrence of my string (but on the POSITIONS column). Then I make the offset as high as the amount of rows detected by the COUNTIF function (which counts all occurrences of my PRODUCT-STORE pair), returning an array of all the positions (column D) matching the PRODUCT-STORE pair.
Ask for formula in Spanish if you need it.

Excel / How to automatically find the correct option from a drop down list while typing in the cell , for an entire column

I work at a currier company and daily data inputs are numerous. I made a table and in a column I made every cell a drop down list , each new data entry creates a new row and that specific column cell becomes a drop down list for the input. It takes source data from a different tab from the file. The source data for my drop down list is massive , more than 100 rows, so my only option was to click the cell, scroll down the bar to find my choice from the list based on alphabetical order...I am looking for a better solution where I can just type in the cell and show me underneath the possible choices from the list, in a similar manner to the excel filter search bar. Basicly to be more specific, for each input row I create, I need to register a location and that location cell is my drop down list. I have more than 200 locations therefore I need a way to fine my right choice as I type in the cell . Some locations may be similar so I need to view similar choices.
Is this possible and if so how?
Thank you in advance for your time.

Excel Help: Dynamic range + Data Validation

I got a problem with some popular Excel question, dynamic ranges and data validation drop-downs and auto-populate. Lets say I got 2 sheets, and on one sheet I got drop-downs to choose from another sheet, and that is not a problem when I define cells and range using:
=OFFSET($A$19;;;COUNTA('0528 - info'!$E$2))
..but what about when I wanna add some new cells in between,so that they can be automatically recognized in which group they belong:
As you see for instance Column B has some "groups" where you can find more different "values" like in Column C, like Power Supply has MV1 and MV2... and so on. My drop-downs on the sheet 1 are called exactly like this "groups" and I did reference them manually using given function. But is it possible to populate my drop-downs automatically when I add for instance MV3 beneath MV2 in this table? Or RN7 on 14th row? Everytime I add new values I have to extend my dropdowns (what is fine..), but problem will be when I share this table to others, they gonna forget it 90%.
I hope you get my point, any suggest will be fine!
p.s. Indirect doesnt work in a way it should - It gives me all instances from the Column but not specific ones that I need.
=INDIRECT("Table4[VarEDS]")
Well this option gave me again what I already had before - all "matches" from the Column and still not ONLY matches that are for certain group. ...
If your Data Validation source is a "Table" as shown in your image then you can take advantage of "Table Column" Range which is dynamic. That means whenever you refer that column as NAMED range and if make changes to the column (Edit, Add, Delete) it will reflect in the referred cell.
You can use this technique even for ranges not in table. You need to NAME them with offset formula and make dynamic.
You can find dynamic address of your column as shown in the image below. Select entire column WITHOUT Header
Name your column data range with appropriate name as shown in image below
Then in Data Validation Window refer this name using F3 as shown in image below.
Then you can see... Even if you edit, add or delete any row in the column the data validation will change
Editing based on your comment below: If you want text from column B and Column C appear together in the validation dropdown list. Insert column in the table and join text from column B and C and then make data validation based on that column as shown in Colum D in image below
Finally I think I understood your question.
Watch this video
Excel: Find Multiple Matches & Dependent Drop Down List
After some days of searching and trying I got what I wanted - wasnt wasy job at all. Needed to combine more functions with the help of couple of videos from Leyla (Xelplus):
https://www.youtube.com/watch?v=gu4xJWAIal8
https://www.youtube.com/watch?v=7fYlWeMQ6L8&t=5s
First step was to make unique list of my values (text in my case) on separate sheet:
=IFERROR(INDEX(t_VarGroup[Vargrouptext];MATCH(0;INDEX(COUNTIF($J$2:J2;t_VarGroup[Vargrouptext]););0));"")
Then I needed to "extract" all the values that are belonging to the certain unique values:
=#IF($I3<COLUMNS($K$2:K$2);"";INDEX(t_EDS[[VarEDS]:[VarEDS]];AGGREGATE(15;3;(t_VarGroup[[Vargrouptext]:[Vargrouptext]]=$J3)/(t_VarGroup[[Vargrouptext]:[Vargrouptext]]=$J3)*(ROW(t_VarGroup[Vargrouptext])-ROW(t_VarGroup[[#Headers];[Vargrouptext]]));COLUMNS($K$2:K$2))))
FUrthermore, I created Unique drop down list:
=OFFSET($J$3;;;COUNTIF($J$3:$J$14;"?*"))
And then dependent drop down list nearby using:
=OFFSET($K$2;MATCH($H$2;$J$3:$J$17;0);;1;COUNTIF(OFFSET($K$2;MATCH($H$2;$J$3:$J$17;0);;1;20);"?*"))
And because I made it on other sheet, I had to reference them to an appropriate sheet name where my main sheet is - with drop downs, it is actually very useful for my future work and for everyone else who has struggling with drop downs but on a bit specific way =))
credits to: #Naresh Bhople for suggestion about Youtube videos.

Remove Blanks from cascading (dependent) drop-down list

So I've got a table with two drop-down lists; the first is a drop-down list of categories, the second is a list of projects within those categories. The way it works is simple: you pick a category, and then the second list gives you the appropriate projects. The lists are based on this table:
The problem I'm facing is that the number of projects in each category isn't the same, so while it works fine for categories like Graphic Design (Column D), the list for categories like 3D animation (Column B) are filled with blank spaces.
Is there any simple way of getting rid of the spaces?
Ideally by having excel ignore blanks, because we add new projects from time to time, so Id like the range to stay the same, and not have to fiddle with it too much when adding new projects.
Thanks :)
Here is a simplified illustration on one way to achieve what you want. Note I am applying this in Sheet2.
Let's assume that your lists are in a table called Table1.
Let's assume that your initial dropdown is in E2, and that options must correspond with the header names in Table1.
Firstly we will create a name called DepDD_All, as follows:
=INDEX(Table1,0,MATCH(Sheet2!$E$2,Table1[#Headers],0))
This will generate a sub-list for your dependent dropdown, including blank lines.
To create lists based only on the actual line count, I will use a secondary name, called DepDD_Dyn, as follows:
=INDEX(DepDD_All,1,1):INDEX(DepDD_All,COUNTA(DepDD_All),1)
Reference this name in your dropdown to display only lists with relevant number of items.

Excel VBA Drop Down List with dependent list with multiple selection

I have a spreadsheet where clients have to make Drop Down selections for (1) Account, (2) Account Name and (3) Account Categories throughout excel and are dependent of each other. I actually did a non-VBA Drop Down List dependent of each other. The problem is that the drop down list only works one at a time instead of making multiple selections.
So what I want of course is the drop down list to work for not just one row, but selections of many rows.
The only way this Drop Down List would work non-VBA is by creating as my many Unique List depending on the number of accounts and their dependents.
So far without using Excel VBA I have done the following:
I have Defined Name the 3 Main List ranges: GLacct,GLname, & GLcat:
Created - 3 Unique List:
So this Unique List is populated when the first DDL "55700" is selected, next DDL will populate "Research - Other" and then the next DDL will populate 3 choices correspondent to "Research -Other".
So to create the Unique List in excel I added these formulas:
UniqueGLacct: `INDEX(GLacct,MATCH(0,COUNTIF($F$1:F1,GLacct),0))`
UniqueGLname:
`INDEX(GLname,MATCH(0,COUNTIF($G$1:G1,GLname)+(GLacct<>TM!$A$16),0))`
UniqueGLcat:
`INDEX(GLcat,MATCH(0,COUNTIF($H$1:H1,GLcat)+(GLacct<>TM!$A$16)+(GLname<>TM!$B$16),0))`
Name Manager – Refers to and added the following formulas:
GLacct: Offset(TB!$A$2,0,0,COUNTA(TB!$A$2:$A$1000))
GLname: Offset(TB!$B$2,0,0,COUNTA(TB!$B$2:$B$1000))
GLcat: Offset(TB!$C$2,0,0,COUNTA(TB!$C$2:$C$1000))
uniqueGLacct: OFFSET(TB!$F$2,0,0,COUNT(IF(TB!$F$2:$F$1000=””,””,1)),1)
uniqueGLname: OFFSET(TB!$G$2,0,0,COUNT(IF(TB!$G$2:$G$1000=””,””,1)),1)
uniqueGLcat: OFFSET(TB!$H$2,0,0,COUNT(IF(TB!$H$2:$H$1000=””,””,1)),1)
Added the Data Validation to cells that need the drop down list in Sheet named ™: ( The problem is if I where to make another selection in the next row, I still get the data from the first selection, which means in order to work I have to make as many Unique List for each account.
cell: A16: uniqueGLacct
cell: B16: uniqueGLname
cell: C16: uniqueGLcat
How would I make this Excel Drop Down List dynamic for 3 List dependent for multiple selections using Excel VBA. But if you notice accounts below 55700 can't popular their dependent list because the first selection made is 55700.
The only way this would work without using VBA is by creating Unique List for each account dependent.
I'm not sure you can't do this without a macro.
1) First you could change your reference style to R1C1:
Link to great explanation
2) Then you would create a named range for each unique list (I am assuming they are finite).
3) Then you would add validation List and then Indirect to an name of that range (in the header or an offset cell) to each indirect.
With this, you can just say "This Row, Column offset" or whatever is applicable:
In this case I selected the same row, one column to the left which is the name of the named range that I wanted in the drop down.
The benefit of this is that you have 1 formula across all of your cells. You can change the display back to A1 type display and the formulas will adapt.

Resources