Why would the Filter formula only give the "No Match" result when there' clearly a match? - filter

I'm trying to produce a dynamic list of item numbers based on a yes/no answer from a table in the second sheet in the workbook. If the word "YES" is present in a row (Available) I want to add the item number (ITEM #), if the word "NO" is present I want it to skip over and go to the next row. I have gotten the formula to the point where it functions but is only returning the No Match result.
Notes: The second table name is Internal Data. The result will be in in the table on the sheet named "FINAL" and shouldn't affect the formulas in the rest of the cells. The formula is written in the bar as well as on here. [Here's pics of both tables]](https://i.stack.imgur.com/0rQv3.png)
I have tried various alterations of both the legacy and current formulas below.
Legacy: =AGGREGATE(15,3,(InternalData[#[AVAILABLE]]="YES")/(InternalData[#[AVAILABLE]]="YES")*(ROW(InternalData[#[AVAILABLE]]="yes")-ROW($M$6)),ROWS($U$6:U7))
Current: =FILTER(InternalData[AVAILABLE],(InternalData[ITEM '#])="YES","No Match")
It seems the current formula is better and less error prone. I was expecting the item # on line 5 of "FINAL" to return the value "30620" but I'm only getting "No Match"

Related

Match part of the text and replace with another text in excel

I've data table with list of names which are having few differences. I am trying to change those text to similar name within data table as image in below.
If part of the text in cells in data table are matching with the "Abbreviations" list(Col-AK) then Data table text must replace with the text in "To be replaced" (Col-AL) into "Expected Return Table". I've tried using may different functions to accomplish my ultimate target, but none of them is giving perfect answer.
Can anybody help me with this problem.
I found an answer to my problem. I could do this using below formula.
Step 01:- I've used below static formula at first to identify the dynamic formula
=IF(LEFT(AC2,4)=$AK$2,$AL$2,AC2)
Step 02:- Then I've used Index function to return the first text in abbreviation list which is Iodine by only changing partial of the formula to return only single value avoiding others. Ex: Firstly I considered only about the Iodine in the list. This will only replace Iodine into the expected data table.
=IF(LEFT(AC2,4)=INDEX($AK$2:$AK$11,1),$AL$2,AC2)
Step 03:- Then row_num turned into dynamic and expanded the return text data into range($AL$2:$AL$11) from single($AL$2) using Match & Left function as below.
=IF(LEFT(AC2,4)=INDEX($AK$2:$AK$11,MATCH(LEFT(AC2,4),$AK$2:$AK$11,0)),INDEX($AL$2:$AL$11,MATCH(LEFT(AC2,4),$AK$2:$AK$11,0)),AC2)
Step 04:- Finaly ignore errors using IFERROR Function.
=IFERROR(IF(LEFT(AC2,4)=INDEX($AK$2:$AK$11,MATCH(LEFT(AC2,4),$AK$2:$AK$11,0)),INDEX($AL$2:$AL$11,MATCH(LEFT(AC2,4),$AK$2:$AK$11,0)),AC2),"")
Expected Return Data Table as shown below.

Google Sheets Iterative Calculation

I am hung up on this iterative calculation in GS. I need an array formula to give me a basic TRUE or FALSE response based upon the result in the cell immediately above. I've created a sandbox chart here: https://drive.google.com/open?id=1YzC5mbxv4jDGnBn8HJ62ehBxMx1UGlNJczVVCm3Vjh4
Column A includes a checkbox next to each Category. Column B is a list of Category Names and each sub-entry. We're going to constantly add new sub-entries over time. When a user checks the box next to the Category, I want the Category name and all sub-entries to be labeled TRUE (as shown in column D). I have dragged this formula down in Column D, however, this is not a sustainable solution as our table will eventually contain about 6,500 categories each with 10-30 sub-entries. We need an array formula solution.
=ARRAYFORMULA(IF(ROW(A2:A) <= MAX(IF(NOT(ISBLANK(B2:B)), ROW(A2:A))),
VLOOKUP(ROW(A2:A), FILTER({ROW(A2:A), A2:A}, LEN(A2:A)), 2), ))

Google spreadsheet validation if statement

I've used validation to create a drop down list of things that will require different values. So in the next column I want to create a formula that checks if anything has been selected in the list (otherwise show nothing e.g ""). Then if a certain item has been selected, multiply it by a certain value, say 2 and then display the total.
=if(isblank(A1);"";A1*2) will return blank if A1 is blank and twice the value in A1 otherwise. If by a certain item you mean only one of the valid items is to be doubled, then please instead try =if(A1=x;A1*2;"") where x is the 'certain item' value.

How to sort only those rows which have no blank cell?

I have a Google Spreadsheet with two separate sheets. The first one is just a big list of names and data, and the second is supposed to be a sorted listing of all the data on the first sheet (sorted by, say, last name). Here is the current way I am defining the second sheet:
=sort(sheet1!A2:L100, sheet1!D2:D100, TRUE)
Which works fine for the most part, except for one issue: in sheet1, some of the cells in 4th column (column D) are blank. How can I change the formula so that the sorting ignores such rows which has a blank cell in column D?
The formulas i tried but got undesirable results :
=arrayformula(if(istext(sheet1!D2:D100), sort(sheet1!A2:L100, sheet1!D2:D100, true), ""))
It sorted as desired but with one issue - blank cells were not pushed at the end but scattered in between the rows.
=arrayformula(sort(filter(sheet1!A2:L100, istext(sheet1!D2:D100)),sheet1!D2:D100, true))
Though the filter part does its job perfectly but when coupled with sort, it is giving an error : Mismatched range lengths.
To filter out the rows with blank cells in column D, you could do something like #2, but as the error message suggested, the second argument would need to be filtered as well to ensure the ranges are the same length. Fortunately there is an easier way, and that is to use column indices rather than ranges:
=SORT(FILTER(sheet1!A2:L100;ISTEXT(sheet1!D2:D100));4;TRUE)
Alternatively you can use the QUERY function for this sort of thing:
=QUERY(sheet1!A2:L100;"select * where D != '' order by D";0)
For anyone looking this, the accepted answer works great if filtering out blank cells that are truly blank, but if the cells contain formulas that evaluate to blank (""), ISTEXT will evaluate to TRUE and blanks will not be filtered out. I modified the accepted answer slightly to work in my situation, in which I had cells containing formulas (that evaluated to "") that I wanted to filter out:
=SORT(FILTER(sheet1!A2:L100,sheet1!D2:D100 <> ""),4,TRUE)

Controlling Sorting in SSRS Based Upon a Database Text Field

I've been trying to find a way to even search for this without much luck.
Basically, I've got a text field in a table. All I'm trying to do is check if that text field contains a particular string, in this case, if this field contains either "OLD", "OBSOLETE", or "FOM" and then move it to the very bottom of the list, leaving everything else sorted normally. Is this possible? I'm trying to do this without hitting the SQL Statement itself too much if at all.
You can do this by using a switch statement in the expression/function related to the sort. Logically a switch() is very similar to a case statement.
Under 'sorting options' add a new sort line item (or modify the existing item) by clicking the expression button to the right (Fx)
Then Modify the sort expression similar to this:
=Switch(Fields!YourField.Value="Old","xxx",
Fields!YourField.Value="Obsolete","yyy",
Fields!YourField.Value="Fom","zzz",
1=1,Fields!YourField.Value)
This creates a switch statement that replaces the value to be sorted of the items you mentioned to xxx,yyy, & zzz effectively moving their sort value to the end of the list. Their displayed value will remain the same.
Switch stops evaluating when it finds the first true; so the final 1=1 is basically the otherwise clause that says sort by whatever the actual value of your field is when not old, obsolete, or fom.

Resources