I am struggling with the autocomplete list in my excel document.
I was trying to use the example from OzGrid
https://www.ozgrid.com/Excel/autocomplete-validation.htm
But it seems like this step is not explained well enough.
First of all, I did step one by linking my cells between these 2 sheets.
[![enter image description here][1]][1]
In both "Frontsheet" and "Locality" the list range is from C51 to C67, as per the OzGrid advice.
Next the step with [Dynamic Ranges][2] probably refers to older versions of Excel with traditional menu, where we could select the "Tools" from the bar. Now in Excel 2016 I believe, that it should be like follows:
Formulas - Name manager - New... where we put our name, scope and refers to (range). I have created the Myrange
[![enter image description here][3]][3]
and finally, I put the formula (assuming that the C50 is my dropdown list cell):
=OFFSET(Frontsheet!$C$50,0,0,MATCH("*",Frontsheet!$C$51:$C$67,-1),1)
but I am getting nothing apart of #N/A
I don't know what's next.
I don't want to use VBA this time, because I want to have these lists allocated to the specified cells. I want to search the records by typing not by selecting since I have got them quite a lot. Is it possible?
This question is somewhat a duplicate to the previous ones, which unfortunately didn't bring me the solution.
Excel 2010: how to use autocomplete in validation list
Excel data validation with suggestions/autocomplete
Your formula =OFFSET(Frontsheet!$C$50,0,0,MATCH("*",Frontsheet!$C$51:$C$67,-1),1) shouldn't return anything but #N/A when entered in a cell because it defiens a range which Excel can't display in a single cell. However, you can use it to define a named range and then use that name to define a Data Validation list.
MATCH("*",Frontsheet!$C$51:$C$67,-1) doesn't work reliably if there are numbers in the lookup range. You might replace it with COUNTA(Frontsheet!$C$51:$C$67) which can deal with numbers or text equally well. The difference is that MATCH will produce the entire list, including intervening blanks, while COUNTA will truncate the list at the bottom by as many rows as there are blanks higher up. Either way, one usually avoids blanks in the source for a validation list.
If you want the user to be able to either choose or enter, you must disable Show alert after invalid data is entered on the Error Alert tab of the Data Validation dialog box, where you set up the validation rules.
The OzGrid solution is poorly written and deceptive. It is simply capitalizing on AutoComplete for cell values. There is no magic in linking to another sheet and using offset or in creating a named reference.
All you need to do is add a list of values you intend to use in the column above the column. Avoid empty rows between this list of 'default' values and what you intend to enter.
Skipped rows 'break' AutoComplete for cells.
But can be resolved by adding an adjacent contiguous 'indexing' column.
Related
I have some materials in column B, a few among these are in a Table definition called Material_List. In D49 I am trying to write a conditional statement such that, if the data in B49 already exists in the table definition, then print the header name or else INDIRECT($49). C49 has the independent dropdown list and D49 will be the dependent.
In D49 I have used the following formula within the Data-->Data Validation-->Source=
=IF(MAX((ISNUMBER(MATCH(Material_List;$B49;0))*COLUMN(Material_List)))=0;
INDIRECT($C49);
INDEX(Material_List[#Headers];1;MAX((ISNUMBER(MATCH(Material_List;$B49;0))*
COLUMN(Material_List))))))
with Allow=List. But it says Error "There is a problem with this formula"
When typed the following formula in cell D50 directly, it works well but obviously without dropdown.
=IF(MAX((ISNUMBER(MATCH(Material_List;$B50;0))*COLUMN(Material_List)))=0;
INDIRECT($C50);
INDEX(Material_List[#Headers];1;MAX((ISNUMBER(MATCH(Material_List;$B50;0))*
COLUMN(Material_List))))))
I am trying to build a dropdown list based on the mentioned criteria. could anyone please tell what is wrong with my formula?
I think the main issue with your formula is that you cannot use table references in the data validation.
Don't ask me why. I think it is just an outstanding Excel bug which hasn't been fixed yet. Please see this link for further info: https://exceloffthegrid.com/using-an-excel-table-within-a-data-validation-list/
The best way I have found to work around this is to create a named range which refers to the table references you need ("Material_List" and "Material_List[#Headers]" in your case). Then you can use those named ranges in your data validation instead of the table references directly.
However, I think there are also other issues with your formula. For example, this part:
MATCH(Material_List;$B50;0)
Normally a MATCH would be in the format of:
MATCH(<single value to look for>, <range to look in>, 0)
You appear to have that reversed, meaning that it should always return a #VALUE! error.
Also, I don't think you can use match on a 2D array, so if your "Material_List" table is more than a single column, that would also cause it to return a #VALUE! error.
UPDATE:
The way I would tackle dependent dropdowns would be as follows.
I would create a "Material_List" table similar to below (could be on a hidden sheet):
Then I would create 3 named ranges.
One for the table body range, called "MaterialList_TblRange":
=Material_List
One for the table header range, called "MaterialList_TblHeaderRange":
=Material_List[#Headers]
And one to refer to the dependant dropdown options, called "DropDownOptions" (this is by far the most complicated part):
=INDEX(MaterialList_TblRange,1,MATCH(Sheet1!$B23,MaterialList_TblHeaderRange,0)):INDEX(MaterialList_TblRange,COUNTA(INDEX(MaterialList_TblRange,1,MATCH(Sheet1!$B23,MaterialList_TblHeaderRange,0)):INDEX(MaterialList_TblRange,ROWS(MaterialList_TblRange),MATCH(Sheet1!$B23,MaterialList_TblHeaderRange,0))),MATCH(Sheet1!$B23,MaterialList_TblHeaderRange,0))
I will explain what this is doing in a moment.
The last step is to set up the data validation where we want our lists.
Where we want the master lists to appear, we can simply enter:
=MaterialList_TblHeaderRange
And the defendant dropdown validation can be entered as:
=DropDownOptions
This is the result:
Now back to the long "DropDownOptions" named range formula...
Basically, we use INDEX:INDEX to select the first/last cell in the range we want to use in out dropdown.
The first INDEX:
=INDEX(MaterialList_TblRange,1,MATCH(Sheet1!$B23,MaterialList_TblHeaderRange,0))
Simply selects the first cell from the column whose header matches the selection in our first dropdown.
The second index does the same, except that instead of selecting the first cell in the column, it counts the number of cells that contain text and uses that as the last cell in the range.
This does mean that we mustn't have any gaps in this table, otherwise an option might be missed off the end.
I hope this makes sense.
This is my first my post here, so please correct me where I am not clear with my question.
What do I want
I want to create a dropdown, where in column 'N' I can make a dropdown choice, which limits what I can see in column 'O'.
So, if I choose in column 'N' for 'single_choice', I can only see the options that apply to 'single choice' in column 'O'.
For hours I am trying to get this formula work in Excel "Data Validation" for the list dropdown option.
=IF($N$2="family.single_choice",'Data Formatting'!$N$2:$N$4,
IF($N$2="family.matrix",'Data Formatting'!$N$6:$N$10,
IF($N$2="family.open_ended",'Data Formatting'!$N$11:$N$14,
IF($N$2="family.demographic",'Data Formatting'!$N$15:$N$16,
IF($N$2="family.datetime",'Data Formatting'!$N$17:$N$19,
IF($N$2="family.multiple_choice",'Data Formatting'!$N$5,
IF($N$2="family.presentation",'Data Formatting'!$N$20:$N$21)))))))
To make it a dropdown, I tried to place the formula in 'Data Validation'.
A shorter version of the formula worked fine, but when I tried to paste the entire formula, it became a challenge to paste same in Data Validation.
After some searching through the internet, I learned that 'Data Validation' allows for a maximum of character.
Through below link of someone with the same question, I learned that I could solve the challenge by applying the formula in a 'Named Range' with a 'fix' in Excel.
See below the link that I found and used:
Excel-VBA Assistance - Data Validation too long, need alternative
As below, I placed the formula in a named range called: 'SubtypeFormula" with the 'fix' at the front and end of the formula.
`=IF($N$2="family.single_choice",'Data Formatting'!$N$2:$N$4,
IF($N$2="family.matrix",'Data Formatting'!$N$6:$N$10,
IF($N$2="family.open_ended",'Data Formatting'!$N$11:$N$14,
IF($N$2="family.demographic",'Data Formatting'!$N$15:$N$16,
IF($N$2="family.datetime",'Data Formatting'!$N$17:$N$19,
IF($N$2="family.multiple_choice",'Data Formatting'!$N$5,
IF($N$2="family.presentation",'Data Formatting'!$N$20:$N$21)))))))'
After several tries of adding the formula named 'SubtypeFormula' in Data Validation, I did not manage to get the dropdown option as I wanted. Instead, the exact formula was either shown, or the dropdown was empty.
Unfortunately all my attempts have failed. Please see attached print screen.
Figure 1 ---> this is what I ideally want, but in a dropdown version.
This picture shows the formula in the cell. The formula works in the cell, but it is not a dropdown option.
Figure 2 --> This is what I should do to create the dropdown function, but the formula is too long.
When I placed and used the name of my formula in Data Validation, I don't see the dropdown as intended in figure 1.
Print screens of two figures -
I use the auto-fill handle very often; both dragging and double-clicking. I need it, so I don't want to disable it in the options. However, I have certain situations where I'm just trying to copy down values to the next cells, and it appears Excel is using some type of memory/cache to auto-fill them with crazy values. I recognize the values; but there is no rhyme or reason as to why it's auto-filling them at this moment in time.
Example: There are no formulas in any of these cells and this is just a brand new sheet in Excel. I want to grab handle of cell B10 and copy it down to B14:
Now, I wish I could record a little clip of me copying this down so you can see it change the values live, but I promise you, this is what the values get changed to, and it has no relation to the values above it in the same column or anywhere in this sheet and there are zero formulas anywhere; just a simple table being populated:
What can I do to get this to copy the correct values? This has created errors in other tables where I didn't catch it populating the cells incorrectly in time.
My colleague has been suffering this exact problem and his solution is detailed below:
Go into Advanced Options and under General click on Edit Custom Lists button and you should find your values listed there. If so, you can delete them from this list and the problem should go away
Good luck!
I've been struggling with this longer than I care to admit, but I have a fairly simple OFFSET function call which works on one sheet, but if I copy it to a different sheet it gives a #VALUE error.
On a sheet named "Deliverable" I have this formula in a cell:
=OFFSET(Deliverable!$B$72,1,0,,3)
and it works fine.
If I go to any other sheet and use the same exact formula, or use it in the Name Manager, it gives a #VALUE error.
If I leave off the final parameter indicated the number of columns I want, it does work:
=OFFSET(Deliverable!$B$72,1,0)
but of course isn't giving me the range I need.
Any idea what's going on with this?
I'm using Excel 2016 on Windows 7.
-- Updated Info --
In a nutshell, my spreadsheet has two cells which I'm using as dropdown lists, where the 2nd cell's list feeds off the selection in the first. The data they are based on has this format:
OptionA A B C D
OptionB A B
OptionC D E F
So the first dropdown uses a simple Data Validation source pointing to the column with OptionA, OptionB, etc. Once that's chosen, the second dropdown list should contain the appropriate options for the one selected. So if OptionB is selected, then the 2nd dropdown list should show A and B.
When I initially wrote this, the data validation source was just a simple VLOOKUP entry, but the lists often had blanks since the number of options varies for each entry. Wanting to fix it up a bit, I ended up with this formula:
=OFFSET(Deliverable!B72,Deliverable!B87,0,1,COUNTA(OFFSET(Deliverable!B72,Deliverable!B87,0,1,5)))
There won't be any more than 5 options, and there are no empty cells in the middle of the data to filter out.
In one spreadsheet I have I used this as a named range definition, then specified the named range for the cells data validation source and it worked. In this other spreadsheet however, it gave me the error described earlier.
However, it looks like when I enter the statement directly into the data validation source field and not in the name manager, it works as expected.
Am I taking the totally wrong approach?
What is it that you want this formula to do? As written, it is returning a block of three horizontal cells. The #VALUE error is Excel's way of telling you "Hey, you're trying to return three cells, but I can't fit them all in the one cell that you are calling this formula from".
The reason you see a result in some places and not others is because of something called Implicit Intersection. Give it a spin on Google. But basically, it just returns whichever one of those three results corresponds to the column that the formula is entered into. If you copy that exact same formula to say row F you will see that it returns a #VALUE error there, because it doesn't know what cell it should return given the column you're calling it from doesn't match any of the cells it is returning. The fact that you don't know this indicates that the formula you're using doesn't in fact do what you think it does.
--UPDATE --
Okay, following your further clarificaiton it seems that you're talking about Cascading Dropdowns aka Dynamic Dropdowns. Lots of info on Google about how to set these up, but you may be interested in an approach I blogged about sometime back that not only provides this functionality, but also ensures that someone can't later on go and change the 'upstream' dropdown without first clearing the 'downstream' one should they want to make a change.
Note that those links talk about a slightly complicated method compared to others, but the method has it's advantages in that it also handles more levels than two, and your DV lists are easily maintained as they live in an Excel Table.
This sounds like an array equation. Try hitting Ctrl+Shift+Enter in the other sheets to validate it as an array equation.
Whenever you need to reference ranges instead of single cells, Excel needs to know that you are working with arrays.
This question will be almost exactly like the question below, but I need a slight change to it for my application and I can't quite figure it out:
excel: how can I identify rows containing text keywords taken from a list of keywords
If a row of several text filled cells contains any keyword from a list of keywords, I would like to add that keyword to the end of the row. Each row will be the same number of cells, but some can be blank and they are not necessarily all the same data type, some could be numbers or dates etc. Even more, I would like to add every keyword that appears in the row of text to the end of the row in separate cells.
Relating to the example post that almost answers my question, I am using the more complicated formula for multiple matches, but in that example they only have one column of data they are looking for keywords in. I have several that would be formatted similar to their column A. I tried changing some of the ranges around with no luck specifically where the formula posted has: IF(COUNTIF($A1,"*"&$B$1:$B$10&"*") I changed $A1, to $A1:$D1 with no luck.
The problem showed up because I have several large spreadsheets of text based data about failure modes of different tools and I would like to categorize them in a little more of a controlled way than free form text in every cell and assigning controlled keywords that apply seems like a decent way to do this.
Example case
Expected result
The keyword list shown in Example Case is not shown in the Expected result. The range of keywords is K2:K6
Another feature that would be useful is if I could assign additional words that when found would trigger one of the key words. For example if the key word is "Gear wear" then "Gear wear" would trigger a hit but "stripped gears" would also trigger a hit. I would imagine the keyword list would be set up as a 2D Range with the first column being the actual key word and the cells to the right of each row would be additional words that trigger the key word. I suspect I am getting to the point where I would need to create a VBA macro to do this. If there is a way to accomplish this without writing code it would make it more repeatable on other user's computers.
Enter following formula in Cell F1 then drag/copy across and down as required.
=IFERROR(INDEX($K$2:$K$6,SMALL(IF(COUNTIF($A1:$D1,"*"&$K$2:$K$6&"*"),ROW($K$2:$K$6)-ROW($A$1)),COLUMNS($A1:A1))),"")
This is an array formula so commit it by pressing Ctrl+Shift+Enter
See the image for reference
This formula is derived from the link mentioned in your question.