Excel Formula Not showing # - excel-formula

I have 2 Excel workbook. One of it I can use #when I click on the column header while the another cannot.
Thus the formula will give error when without the #column name.
Formula without #
Formula with #
Sorry, I am unable to make the picture show in this post as it only allow a hyperlink.
Anyone know how to enable the #column name function in formula?

The 2nd screenshot has a tab "Table Design" on the right whereas the 1st screenshot doesn't have that (only filter is applied). As the comments mentioned, remove the filter and convert to a Table (Ctrl + T).
It is also worth mentioning that you can select any range to convert to a table whereas applying a filter may not work if you have empty cells in your data.

Related

Excel Formula too long for Data Validation dropdown list and challenging with Named Range

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 -

Excel data validation by typing instead of selection

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.

Using the Excel SMALL function with filtering criteria AND ignoring zeros

I have a list of prices for products that are variations (different size, color) of multiple parent product. Some products (for reasons not important to this question) have a price of zero.
I'm trying to write an excel formula that will return the lowest price for each parent product that is not zero
I've got this far:
=IF(SUMIFS(I:I,A:A,A3)=0,0,IF(AND(SUMIFS(I:I,A:A,A3)>0,MINIFS(I:I,A:A,A3)>0),MINIFS(I:I,A:A,A3),SMALL(IF(A:A=A3,I:I),2)))
Where I:I is the price column and A:A is the parent reference column
This works in all cases except where I have multiple variations of a parent product that have a zero value.
I need variables in a SMALL or MINIF function that will:
A. Only include the values for a single parent product in the calculation
B. Ignore any zeros in the calculation of the lowest value
Any help would be appreciated.
You can use a Pivot Table to easily create a dynamic list of minimums. Blank cells are ignored by default, and zero's (or any other number you want) can be excluded a few ways; I think the easiest would be using the Pivot Table's Filter feature.
They say a picture is worth a thousand words so an animated GIF must be worth a million... :)
More Information:
Office.com : Filter data in a PivotTable
Office.com : Display or hide zero values
tips.net : Excluding Zero Values from a PivotTable
You can use a 'traditional' PivotTable to do this. See ashleedawg's great answer.
You can also use a 'OLAP' PivotTable that's based off something called the Data Model to do it, that has a small advantage over the 'traditional' PivotTable in that you don't need to clear the PageFilter after refreshing. (More on this at the bottom of my answer).
Any Excel version from Excel 2013 later has the DataModel built in by default, and you also get access to the DataModel in 2010 if you install Microsoft's free PowerPivot add-in. Using the DataModel, here's what you need to do:
Turn your data into an Excel Table using the Ctrl + T keyboard shortcut:
Make a PivotTable out of it, but be sure to check the Add this data to the Data Model option:
Add Group to the Rows pane of the PivotTable, then right-click on Table1 in the fields pane and select Add Measure...:
Give the new Measure a name (I've called it Min Without Zero) and type =CALCULATE(MIN(Table1[Price]),Table1[Price]>0) in the Formula box then push OK:
Put a tick in the Min Without Zero checkbox in the PivotTable fields list.
Bing! The PivotTable shows the min (excluding zero) of each group by price.
Edit: I'd probably use ashleedawg's answer if I was doing this myself. But there's one caveat: If you add additional data in future and refresh, then you need to clear the filter and reapply the zero exclusion to be absolutely sure that any new numbers in the data are included. By way of a demonstration, if I filter out zero from a PageField, then I get just the result I expect:
...and here's how the filter looks:
But if I add new data and refresh, note that nothing has changed in the PivotTable:
...and if I look at the filter I can see why:
That's because when you deselect something from a filter, you're not actually saying "Give me everything except this thing" but rather "Give me the other things currently visible in this list, but leave any new things unselected."
Easily enough fixed: Just clear the filter and deselect zero again (or write some VBA code to do it automatically on refresh).
If the input data is sorted based on the parent reference level you can simply
use offset to find the required parent reference cells containing the price
Find the k-th smallest value using the SMALL formula (i.e. the smallest value)
Put a if condition to give you the 2nd smallest value if the smallest is 0
Place this in the 1st row
=IF(SMALL(OFFSET($I$1,MATCH(C1,$C:$C,0)-1,0,COUNTIF($C:$C,C1)),1)=0,SMALL(OFFSET($I$1,MATCH(C1,$C:$C,0)-1,0,COUNTIF($C:$C,C1)),2),SMALL(OFFSET($I$1,MATCH(C1,$C:$C,0)-1,0,COUNTIF($C:$C,C1)),1))
If you want a formula approach, you can use an IF statement to return a value if that value is over zero, and otherwise return FALSE, as functions like MIN conveniently ignore FALSE.
As per my other answer I recommend you turn the data into an Excel Table first with the Ctrl + T keyboard shortcut, as shown below. Then in a summary table you can use the following array-entered formula in E2:
=MIN(IF(Table1[Price]>0,IF(Table1[Group]=D2,Table1[Price])))
(Array-entered means you push Ctrl + SHIFT+ ENTER instead of pushing ENTER like you usually do)
And here's the result:

how can I find total excluding certain row

Apology if this question has been answered before. In the Summary column I would like to calculate total values for each UserID, excluding Fee which is always 19. As you see there are duplicate UserID's.
I was thinking of using SUMIF'S something like...
=SUMIF(Value, Name,<>"Fee,<>
then I couldn't get it right.
So for example UserID 4836344 total value would be 97.83.
What formula should be used to solve this problem.
Thanks in advance if anyone can help me.
P.S - Let me know if you cannot see the image below.
I would just add another column EffectiveValue that would contain effective value that needs to be added to the total sum. Formula for that column would be something like '=If([Name]="Fee";0;[Value])'.
Then I would sort table by UserId column.
After that I would use Data -> Subtotals feature to produce total sum per user. In wizard you would specify that on every change in UserId calculate sum of EffectiveValue
Sorry if there are syntax mistakes & formatting, but I am writing from mobile phone.
You got your SUMIFS formula almost right. You just need to include the <> within the quotation marks like so:
=SUMIFS($E$2:$E$19,$A$2:$A$19,A2,$D$2:$D$19,"<>Fee")
The above assumes that your sample table starts at A1 with UserID and continues through column E with the values. The above formula would go into cell F2 as the first summary and should be copied down. Keep in mind to adjust the range to include more rows (here only through row 19).
If you have the above sample as a table then you can also use the following formula for F2 and Excel will automatically copy it down:
=SUMIFS([value],[userid],A2,[name],"<>Fee")
To convert your table to an "Excel recognized table" select the entire table and press Ctrl + T as described in more detail on Microsoft's website.
For more information on "Tables in Excel" you might want to read the following articles:
Overview of Excel tables
Use Excel tables to manage information

Can Not Get My VLookUp In Excel To Return The Requested Data

Can Not Get My VLookUp In Excel To Return The Requested Data
I am trying to pull data from another sheet based on data selected from a dropdown on the main sheet.
All the formatting is "General"
=VLOOKUP(F15737,'Location Master'!$A:$J,2,FALSE)
It just keeps returning me #N/A
Try using the Index Match method. It's an alternative to Vlookup which doesn't require data to be sorted and can therefore be of more use.
The typical structure of this method is (the text inside the asterisk will give the ranges specific to your sheet:
=INDEX (**Column from which you want to return a value**, (MATCH(**Lookup Value**, **Column against which you want to lookup**,0))
In this case, if I've understood your workbook structure, the formula should look like this:
=INDEX('Location Master'!$B:$B,(MATCH(F15737,'Location Master'!$A:$A,0)))
This is a common problem with VLOOKUP(). Most likely you have some whitespace (A tab character or some spaces) after one of the values. Click on F15737 and see if there are any spaces at the end of it. Likewise, manually find the value in 'Location Master'!$A and check it for spaces or tabs after the value.
If the whitespace is found in F15737 then you can change your vlookup to be:
=VLOOKUP(TRIM(F15737),'Location Master'!$A:$J,2,FALSE)
If the whitespace is in the range to which you are looking up, then you'll need to trim all of those values, which you can do pretty quickly in a new column with the TRIM() formula.
If this doesn't solve the problem then you might have a number stored as text. Generally excel will tell you if this is the case within the cell with a little green corner indicator. To get Excel to automagically change a column from a "Number stored as Text" to a proper number you can:
Highlight the column
Go to Data>>Text To Columns
Click "Fixed Width"
Click "Finished"
Excel will then format everything automatically (dates to dates, numbers to numbers, text to text, time to time, etc.)

Resources