Excel Match with multiple criterion not working - excel

long-time since I've used these forums, I've got a mock up of a spreadsheet in the image below. I need to use match to check for two features. The third column is just an ID so that if the output worked I could check to see it is right.
The actual date is a name and then a number, manually entered. When I use match with two criteria it returns #N/A. I have even gone through each line with a AND() function to check that there is a true value, which does return True when it ought to. I need the position of the data, not the data itself as it is used in various INDIRECTs later.
Below is formula that I use. I can get induvial criterion to work, but when there are multiple it doesn't work.
=MATCH(TRUE,(B11:B16=H10)*(C11:C16=H11),0)
I have read the other questions on the forum regarding the topic but none of them are the same or I can use anything from them. Any more info needed let me know, and whether you can provide a pointer or a solution that would be great. I am using ctrl+shft+enter to save the formula as well.
Thanks

Expression (B11:B16=H10)*(C11:C16=H11) return number not bool. Try:
=MATCH(1,(B11:B16=H10)*(C11:C16=H11),0)
or
=MATCH(TRUE,((B11:B16=H10)*(C11:C16=H11))>0,0)

Related

FIND() formula to include "implicit intersection operator" change required

Over the weekend, my work laptop did a restart and Microsoft gave me the perfect gift in Excel, it introduced the implicit intersection operator which has completely messed up my world, literally every formula has gone crazy.
I've checked every link I can and cannot work out how to correct even the most basic formula. I would like to ask about this one so I can at least make some progress forwards.
=FIND('Value Definitions'!C3,'User Interface'!K:K) was my formula that was worked forever.
The explanation of this formula is to flag all value definitions that have been used within text of all rows in the user interface column K.
When Excel asks me to correct the formula, it rewrites it as =FIND('Value Definitions'!C3,#'User Interface'!K:K).
This results in #VALUE rather than a number of where the first occurrence was found. If I remove the # then I get #SPILL!.
Just to reiterate the purpose of the formula, I identify which phrases exist in an interface that come from the value definitions worksheet, irrespective of the number value I get (character count of first occurence), I just want to identify that it exists at least once. Then I can use this flag to lookup all related value definitions to be included on the user interface.
Thanks for your help in advance.

If/And functions are not working correctly in my formula, can someone help me?

I have a field in my excel spreadsheet that depends on several different fields to determine the calculation that should be made. I think I have my formula correct but I am not getting the appropriate responses so I know there must be something I am missing. Let me start by summarizing what I am attempting to do.
If D5=2, then I need to verify if $AI$12-AB14>(3/24) and return a T if it is or leave the field blank if not. Alternatively, if D5=1, then I have to also verify that Y14=Y and Z14=Y, and finally $AC$12-AA14>(3/24) and return a T if so, or leave the field blank if not.
(The reference to 3/24 is required as I am performing time calculations from data entry fields pulling from a userform)
What I am receiving for a response is 'True'. That is not an option so I suspect it is returning the result of a specific logical statement? Below is my formula:
=IF(AND(D5="2",$AI$12-AB14>(3/24),),"T","")
=IF(AND(D5="1",Y14="Y",Z14="Y",$AC$12-AA14>(3/24),),"T","")
I can't insert an image in comments, so I'll reply. This simplified example shows how it works:
And pay attention to D5 - are there really values 1 and 2 as text. If not, the quotation marks must be removed from the formula

Need to understand fomula re: excel search for a string in a table and return string if true

I've adapted this solution from a couple of years ago:
=LOOKUP(2^15,FIND(Keywords,A2),Categories)
I use this for searching within a description field for keywords in a named list, in order to return a corresponding category from an adjacent named list.
However I do not understand the significance of 2^15. Can someone explain?
Also it's unclear in what order the search operates. If two keyword options were "check" and "deposit," and they were assigned to different categories, but both appeared in the same description field cell, how do I know which will be found first? Is it placement in the string, or order in the list?
2^15 is simply an arbitrarily large number, which lookup attempts to find - when it can't find it, it takes the next lowest number.
Effectively your formula looks at Keywords, and attempts to find the value in A2. For each word that actually matches A2, it provides a non-error message. Then out of the whole list, it attempts to find that line number in categories, resulting in many errors, and a single correct value. Lookup picks the value by using 2^15. Though this seems to be a weird way of doing it; it is likely a holdover of pre-2007, as Lookup is generally used now only for backwards compatibility purposes. Also using 1 instead of 2^15 worked for a couple of simple cases that I tried when writing this up.

Excel 2013, how to us the "search" function like vlookup

Essentially, I am looking for a way to use the "search" function like the "vlookup" function. In my case, I am have a long list, of say, 1000 descriptions of different types of fasteners and I want to classify them according to what they are, (ie. Nut, bolt, washer etc.). However, I can't sort by description or partnumber because they, alphanumerically, don't line up by class. But he descripotion field does say at some point in it, what it is(ie. Nut, bolt, washer etc.).
As said, I have a table of classes, and I am looking for a formula that would look in the "description" field for all the values in the table,and then return that value, or one associated with it (like vlookup does with cell values).
So that, if it found "nut" in the description, it would return "nut", or if it found "bolt" it would return "bolt."
I hope that this question makes sense. Let me also say that I found a way "manually" do this using the search function, along with others, but the formula was very long and each value in my table had to be specially called out. However, I will include the formula I used to make clear what I was trying to do.
See below.
=IF(ISNUMBER(SEARCH($G$2,C3)),$G$2,IF(ISNUMBER(SEARCH($G$3,C3)),$G$3,IF(ISNUMBER(SEARCH($G$4,C3)),$G$4,IF(ISNUMBER(SEARCH($G$5,C3)),$G$5,...IF(ISNUMBER(SEARCH($G$13,C3)),$G$13,"MISC"))))))))))))
You see that with each item you add to your table, you have to add another if loop. I am hoping there is a better way. (I would call it "vsearch" :-) )
Try this formula
=IFERROR(LOOKUP(2^15,SEARCH($G$3:$G$13,C3),$G$3:$G$13),"MISC")
SEARCH returns an array of numbers or errors depending on whether each term is found in C3. By searching for "bignum" (in this case 2^15) which won't be found, the match is always with the last number, i.e. the last matching term in G3:G13.
MATCH can be used to find the text, and INDEX can be used to return the text
using your example, where you are searching in G:
=MATCH("*"&C3&"*",$G:$G,0)
and then index to return the text
=INDEX($G:$G,MATCH("*"&C3&"*",$G:$G,0))
and as a finishing touch, the #VALUE! replacement
=IFERROR(INDEX($G:$G,MATCH("*"&C3&"*",$G:$G,0)),"MISC")

How to parse cells and remove selected data from excel

I have this as a few cells in excel 2010:
(source: gyazo.com)
There are a few things I am trying to accomplish, though they're really all variations of the same thing.
In both Price Paid and Price Returned, I have values that can either be formatted as "# (type)" or as an expression of the form "# (type)+# (type2) ...". What I'm trying to do is reduce the expressions from their current state into just numerical values. I've figured out how to do it if it is just the first case ("# (type)"), however I'm having issues with doing the second case, since the parse stops after the first instance of " ". Below I have the code that I'm using in both Numerical Paid and Numerical Returned. The ISNUMBER category is there just to show which things register as numbers and which don't.
Numerical Paid and Numerical Returned Code:
=INT(IF(ISNUMBER(D2),D2,LEFT(D2,FIND(" ",D2,1)-1)))
I did some more google searching and found that someone had already written a VBA function to do this. Lovely.
I've linked the source below.
http://www.vbusers.com/code/codeget.asp?ThreadID=624&PostID=1
All I had to do was replace the ".," with "+-/*", so that it'll handle all operations. Simple, elegant, and useful. Afterwards, I used the solution posted here (as an answer to another one of my questions):
How to make a cell equal to the value of an expression in another cell (Excel 2010)?
to evaluate the resulting string.
Thanks everyone.

Resources