10 Replies Latest reply: Sep 10, 2015 7:55 AM by Sunny Talwar

# Excel Lookup SYNTAX - Script

He Guys!

I need some help for my script:

Excel-Syntax:

=LOOKUP(A1;{0.51.151};{1,5.2.3,75})

Whats the syntax for my { }-condition?

Thank you!

LG

Michael

• ###### Re: Excel Lookup SYNTAX - Script

You are seeking help with Excel or QlikView?

• ###### Re: Excel Lookup SYNTAX - Script

you need to give applymap function in Qlikview.

Vikas

• ###### Re: Excel Lookup SYNTAX - Script

For QlikView of corse

applymap function sounds ok.

Do you have an example for me?

• ###### Re: Excel Lookup SYNTAX - Script

But an applymap and Inline Table only find exact matches.

But in my case i have to find a special number if km is between two values.

Here is the example:

In this  case, the result = 2.

----------------------

QlikView Script:

km, number

0, 30

51, 40

151, 50

];

With an applymap i can only find the number to the exact km, or?

In this case, the Number is 100 -> incorrect

Only with km 0, 51 & 151 there is e correct match.

I hope I don’t  think too complicated

• ###### Re: Excel Lookup SYNTAX - Script

Sorry for no confusion:

km, number

0, 1.5

51, 2

151, 3.75

];

• ###### Re: Excel Lookup SYNTAX - Script

You should look at Intervalmatch. See IntervalMatch

HIC

• ###### Re: Excel Lookup SYNTAX - Script

Try this:

Mapping:

Mapping

KM, Number

0, 1.5

51, 2

151, 3.75

];

Table:

ApplyMap('Mapping', If(KM < 50, 0, If(KM < 150, 51, 151))) as Number;

KM

100

34

60

190

134

24

];

Output:

• ###### Re: Excel Lookup SYNTAX - Script

Yea, thank you.

At the end it seems so clear an easy

• ###### Re: Excel Lookup SYNTAX - Script

Awesome

If you got what you wanted, I would suggest marking the correct answer and any useful answers to close this thread.

Best,

Sunny