See simple lookup example below, as taken from the MS official website]
=LOOKUP(C2,$A$2:$A$6,$B$2:$B$6)
Changes in the 'lookup-vector' result in wrong outcomes of the lookup function:
Any ideas why this happens?
[FYI: I am only allowed to post one link]
Your issue arises because to use LOOKUP in array form your data must be sorted.
When you put 100 before the 6 your data becomes unsorted and you'll get unexpected errors.
The strongly recommended practice for array form lookups is to use VLOOKUP or HLOOKUP. The following formula will work even when you change your frequency column:
=VLOOKUP(C2,$A$2:$B$6,2,0)
Source: https://support.office.com/en-us/article/LOOKUP-function-446D94AF-663B-451D-8251-369D5E3864CB
I like working with variables in Excel, it is useful converting everything between commas into a variable, but I got stuck in here, does anyone have an idea how to use array limitations with INDEX() function such as seen in the example?
This is an array formula in a table form:
{=INDEX([#Column1]=[Column1],MATCH(1,([Column2]="Ready"),0),0)}
it returns the right value for the first instance of [#Column1]=[Column1] but for the rest, the result is wrong.
A sample can be found in >>>here<<<.
I saved this in another language, please let me know if transcription of functions are incorrect when you open. I tested but..you know..
This does not need to be an array, use COUNTIF/S instead:
=COUNTIF([Column1],[#Column1])=COUNTIFS([Column1],[#Column1],[Column2],"Ready")
I have two individual statements that work individually
=IF(C6=1,(IFERROR(HLOOKUP(C4,list1,IF(C5"apple",2,IF(C5="orange",3,
IF(C5="plum",4,IF(C5="grape",5,IF(C5="banana",6,"")))))),"")))
and
=IF(C6=2,(IFERROR(HLOOKUP(C4,list2,IF(C5"apple",2,IF(C5="orange",3,
IF(C5="plum",4,IF(C5="grape",5,IF(C5="banana",6,"")))))),"")))
But when i combine them both into if statements,
=IF(C6=1,(IFERROR(HLOOKUP(C4,list1,IF(C5="apple",2,IF(C5="orange",3,
IF(C5="plum",4,IF(C5="grape",5,IF(C5="banana",6,"")))))),""))),
IF(C6=2,(IFERROR(HLOOKUP(C4,list2,IF(C5="apple",2,IF(C5="orange",3,
IF(C5="plum",4,IF(C5="grape",5,IF(C5="banana",6,"")))))),"")))
The Data Look like this
Data sheet
I get a '#Value!' Error, parentheses seem to be in place, not sure whats yielding this error.
OK, you need to do some reading on the HLOOKUP function, LOOKUP function amd CHOOSE function.
This formula follows the rules of your sample formula(s) (such as they are) and should serve to simplify matters by avoiding repetition. Note that "apple","banana","grape","orange","plum" are in alphabetical order.
=IFERROR(HLOOKUP(C4, CHOOSE(C6, List1, List2, List1),
LOOKUP(C5, {"apple","banana","grape","orange","plum"}, {2,6,5,3,4}),
FALSE), "")
If you require more assistance, please edit your original question to include sample data and expected results.
Okay, currently I have an if statement that looks like this:
=IF(AND(OR(K2<>K3,L2<>L3),A2=A3),A2,"")
My issue is that in column K, I want to take off a few characters. I'd like to write this function: Left(K2, LEN(K2)-2)
I'm not sure how to incorporate that into the if statement though. Any ideas?
Background: I'm using Excel functions to parse a lot of data out, essentially creating a flexible pivot table. It sorts a lot of race timing data by car, etc. In this portion of the sheet, I'm searching for the minimum segment times for each car. The rest of the sheet avoids macros and VBA so I'd like to avoid that here.
Issue: My formula worked when there are no zeros, but sometimes there are zeros that I need to exclude. My array formula is pretty complicated, but the change I made that broke it is this:
OLD (working):
{=min(if(car_number = indirect("number_vector"), indirect("data_vector")))}
NEW (non-working):
{=min(if(and(car_number = indirect("number_vector"),not(0=indirect("data_vector"))), indirect("data_vector")))}
I am using INDIRECT() with this exact argument several times in the formula. However, in this particular instance (inside the NOT()), it returns #VALUE! instead of {data1;...;datan}. Please see the screencaps below.
Before evaluation:
After evaluation:
I suspect that your AND function might be a problem - AND only returns a single result not an array of results as required, try using multiple IFs like this
=min(if(car_number = indirect("number_vector"),IF(indirect(data_vector)<>0, indirect(data_vector))))
Note that I also used <> rather than using NOT
Are data vector and number vector the same size and shape? (both vertical?)
why are there quotes around one but not the other?