MATCH function on Excel returns error - excel

For some reason the MATCH function on excel returns an error.
Unfortunately I cannot share the data in order to replicate the problem but I was wondering if someone more experienced than I am could possibly find a small error in my code or something that I missed.
I used the functions according to these directions and I also I tried a solution here but neither source helped much.
=INDEX(IB_RAW!A2:L301,MATCH(1,(IB_RAW!$B:$B=IB!P10)*(IB_RAW!$D:$D=IB!A9)*(IB_RAW!$C:$C=IB!Q9)*(IB_RAW!$L:$L=IB!P7),0),IB_RAW!$J:$J)
I will try to describe the data as best as I can:
IB: The sheet where I want to show the extracted value
IB_RAW: The sheet where I get the information from
A2:L301: The whole dataset that I am using to look for the arguments
(in IB_RAW)
J: The value I want to extract (in IB_RAW)
The issue is with the MATCH function, as it returns #N/A, I've used the Show Calculation Steps... option to see where the problem is,
So for
(IB_RAW!$B:$B=IB!P10) returns TRUE
(IB_RAW!$D:$D=IB!A9) returns FALSE
(IB_RAW!$C:$C=IB!Q9) returns TRUE
(IB_RAW!$L:$L=IB!P7) returns TRUE
Therefore MATCH(1,0,0) but this returns #N/A instead.

Ok, The solution was from this detailed guide. It actually explains that you have to press Ctrl+Shift+Enter to activate the function and also I had to change the line of code a bit.
Hopefully this will be helpful to someone who wants to do the same thing like I did.
=INDEX(IB_RAW!I2:I301,MATCH(1,(IB_RAW!B2:B301=IB!P10)*(IB_RAW!D2:D301=IB!A9)*(IB_RAW!C2:C301=IB!Q9)*(IB_RAW!L2:L301=IB!P7),0))

Related

Basic IF Statement question -probably right in front of me

Sorry i know this is super basic but i didn't know where else to ask and i really feel like the answer is right in front of me...
I have a spreadsheet which im going to use to log PAT test results. When i select the test type from a drop down it changes the standards and thresholds in the bit below and will tell me if each test passes or fails. It uses several vlookups and relative references - so far no VBA. Looking at this photo. What I'm trying to do is get the formula in cell I13 to read the symbol in F13 and use that in the formula rather than typing the symbol directly into the formula as its going to change when i change the Class Type option.
So far ive gotten to this (has a blank IF to start with to keep it neat:
=IF(H13="","",IF((H13&F13&(VALUE(G13))),"PASS","FAIL"))
The bit in bold is where the issue is. When i run the evaluate formula it boils the bold bit down to "0.01>2" which is correct however it then wont read that in the larger IF statement - i think its the quotation marks. So i think it needs another function to allow the IF statement to read that as the logical test rather than a text string.
I've tried VALUE, FORMULATEXT, NUMBERTEXT, all the ones that might be close to what I'm trying to do but 100% stumped now. Always bring sup the #VALUE Error.
Appreciate any advice? TIA
There is no built-in function for that. You need either a VBA function or the old EVALUATE XLM function (which you can't use directly in a cell, it has to be in a defined name). Sample UDF:
Function EvaluateFormulaString(FormulaString as string)
EvaluateFormulaString = application.evaluate(formulastring)
End Function
then your formula would become:
=IF(H13="","",IF(EvaluateFormulaString(H13&F13&(VALUE(G13))),"PASS","FAIL"))

I got #num! error in my formula I used in Excel. I would like to ask where I got an error and What should I do?

I have an excel file that is populated with a lot of formulas. I am trying to populate the result by subtructing the latest value to the previous value and dividing the result given in the cell. Please see the photo below. As you can see, starting in row 6 i used the formula of:
"=ABS(IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),10),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),9))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),9),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),8))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),8),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),7))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),7),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),6))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),6),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),5))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),5),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),4))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),4),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),3))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),3),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),2))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),2),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),1))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),1),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),1))/E7*(F7-LARGE(IF(find3=$H7,$F$6:$F$196),2))/E7)))))))))))"
In order to get the result of =(f7-f6)/e7. I added if functions cause there are some values that the lookup value is mentioned ($H7) below the table. When the lookup function was changed (please see the second photo), the formula was changed also into this:
"=ABS(IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),10),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),9))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),9),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),8))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),8),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),7))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),7),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),6))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),6),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),5))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),5),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),4))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),4),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),3))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),3),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),2))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),2),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),1))/E15,(F15-LARGE(IF(find3=$C15,$F$6:$F$196),2))/E15))))))))))"
But I've got a result of a #num! error. It's the same statement, the only difference is the looked up value. And when I try to show the calculation steps (Please see the third photo attached below), it says I've got an error in the first statement but why it was working on the first lookup value?
I am noob in excel. Please help me!!!
The reason for this error is that the LARGE function returns #NUM because the underlying array is empty / contains the FALSE result from your IF function (see here for details https://support.microsoft.com/en-us/office/large-function-3af0af19-1190-42bb-bb8b-01672ec00a64).
The reason here likely is that your find3=$C15,$F$6:$F$196 does not find a match.
Since we do not know what find3 is, you will need to look into the reason for that on your end (i.e., is there value of 5725 EGJ in your find3 data range? If not, why not? If yes, are you sure it spelled the same way (no leading spaces)?).
Once that is fixed you should be good to go.

Excel Match with multiple criterion not working

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)

Using trim function on table references

I'm attempting to aggregate from an imported data source in excel. I have 2 combo boxes that specify conditions for a sumifs function (selected using offsets).
Where I struggle is that the data doesn't seem to match unless I use a trim function (I tested this on by adding a column to the data table).
The following formula always returns 0
=SUMIFS(Table_ExternalData_1[RedFlag],Table_ExternalData_1[RAGSTATUS],"=trim("&ReconAggregation!$A4&")",Table_ExternalData_1[ClientDescription],"=trim("&OFFSET(Lists!$A$1,Lists!$B$1,0)&")", Table_ExternalData_1[AgencyDescription],"=trim("&OFFSET(Lists!$C$1,Lists!$D$1,0)&")")
when I add the trims
=SUMIFS(Table_ExternalData_1[RedFlag],trim(Table_ExternalData_1[RAGSTATUS]),"=trim("&ReconAggregation!$A4&")",trim(Table_ExternalData_1[ClientDescription]),"=trim("&OFFSET(Lists!$A$1,Lists!$B$1,0)&")", trim(Table_ExternalData_1[AgencyDescription]),"=trim("&OFFSET(Lists!$C$1,Lists!$D$1,0)&")")
it tells me that I have a formula error. Any idea why? Is there a better way to do this?
Cheers,
G
it tells me that I have a formula error
Maybe there's problem with your "
=SUMIFS(Table_ExternalData_1[RedFlag],trim(Table_ExternalData_1[RAGSTATUS]),"=trim('&ReconAggregation!$A4&')",trim(Table_ExternalData_1[ClientDescription]),"=trim('&OFFSET(Lists!$A$1,Lists!$B$1,0)&')", trim(Table_ExternalData_1[AgencyDescription]),"=trim('&OFFSET(Lists!$C$1,Lists!$D$1,0)&')")
As It happens, the "=" were not required on the right hand side. This was found through trial and error. Still unsure as to why the trim function on the left prompted an error, but with additional cleansing of the source data it wasn't required. Thanks all for your input.

Excel Match multiple criteria

Could someone help me turn this 2 Criteria match function into a 4 criteria match function please? This one works, but is only the start:
=INDEX(range1,MATCH(1,(A19=range2)*(B19=range3),0))
I also want a third and fourth match in the above formula, with those two being an OR option. I thought based upon the working version that this might work, but it doesn't:
=INDEX(range1,MATCH(1,(A19=range2)*(B19=range3)*(OR(C19=range4,D19=range5)),0))
I've been trying to use AND commands, my initial version of the first code above being this:
=INDEX(range1,MATCH(1,AND(A19=range2,B19=range3),0))
It always returns #N/A after CTRL+ALT+ENTER is entered though, so it's obviously an issue with my understanding of either MATCH or AND (or both I guess),
The first example works EXACTLY as intended, but unfortunately I don't know why and I can't work it out well enough to adapt it. Maybe I'm too tired and have run out of space in my head for the peculiar way in which Excel formulas work, but I've read and re-read the help files for them and still it doesn't make sense to me.
Any help would be greatly appreciated, as always.
Thanks,
Joe
I'm just guessing here, but would this work?
=INDEX(range1,MATCH(1,(A19=range2)*(B19=range3)*(((C19 = range4)+(D19 = range5))>0),0))

Resources