Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ola Sigurdh
 
Posts: n/a
Default Formula help (Lookup)

Hello!
I use this formula to extract data from a pricelist. I found this formula on
the net (thanks to whoever who made it).
{=INDEX(B93:E302;MATCH(Pris!I2&Pris!G2;A92:A301&B9 2:B301;0);Match(Pris!H2;92:92;1))}
The problem I have is that it only allows exact match on the first two
lookups, I can not change the type from 0 to 1 or -1 to allow for a not
exact match like I have done in the third lookup. Column A is a name for
fifferent pricelists,Column B is length in kilometers and Row 1 is weight in
kilos. First I lokkup which pricelist to use then the length and then the
weight.
Any ideas?

My pricelist looks something like this

A B C D E F
1 2500 5000 10000 20000
2 A 20 400 500 600 700
3 A 50 500 600 700 800
4 A 100 700 800 900 1000
5 B 20 100 200 300 400
6 B 50 200 300 400 500


TIA

Ola


  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Instead of concatenating the cells, I like this syntax for matching multiple
columns better:

=index(othersheet!$c$1:$c$10,
match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet !$b$1:$b$100),0))

Maybe you could use the same sort of technique:

=INDEX(B93:E302;MATCH(1;(Pris!I2=A92:A301)*(Pris!G 2<=B92:B301);0);
MATCH(Pris!H2;92:92;1))

Then you can use whatever you want in this portion: (Pris!G2<=B92:B301)

(I would have guessed that column A had to be an exact match, but that's just my
guess.)



Ola Sigurdh wrote:

Hello!
I use this formula to extract data from a pricelist. I found this formula on
the net (thanks to whoever who made it).
{=INDEX(B93:E302;MATCH(Pris!I2&Pris!G2;A92:A301&B9 2:B301;0);Match(Pris!H2;92:92;1))}
The problem I have is that it only allows exact match on the first two
lookups, I can not change the type from 0 to 1 or -1 to allow for a not
exact match like I have done in the third lookup. Column A is a name for
fifferent pricelists,Column B is length in kilometers and Row 1 is weight in
kilos. First I lokkup which pricelist to use then the length and then the
weight.
Any ideas?

My pricelist looks something like this

A B C D E F
1 2500 5000 10000 20000
2 A 20 400 500 600 700
3 A 50 500 600 700 800
4 A 100 700 800 900 1000
5 B 20 100 200 300 400
6 B 50 200 300 400 500

TIA

Ola


--

Dave Peterson
  #3   Report Post  
Ola Sigurdh
 
Posts: n/a
Default

Thank´s för your help. I´l give it a try later this afternoon. You are
right column A would be an exact match.

Ola

"Dave Peterson" skrev i meddelandet
...
Instead of concatenating the cells, I like this syntax for matching
multiple
columns better:

=index(othersheet!$c$1:$c$10,
match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet !$b$1:$b$100),0))

Maybe you could use the same sort of technique:

=INDEX(B93:E302;MATCH(1;(Pris!I2=A92:A301)*(Pris!G 2<=B92:B301);0);
MATCH(Pris!H2;92:92;1))

Then you can use whatever you want in this portion: (Pris!G2<=B92:B301)

(I would have guessed that column A had to be an exact match, but that's
just my
guess.)



Ola Sigurdh wrote:

Hello!
I use this formula to extract data from a pricelist. I found this formula
on
the net (thanks to whoever who made it).
{=INDEX(B93:E302;MATCH(Pris!I2&Pris!G2;A92:A301&B9 2:B301;0);Match(Pris!H2;92:92;1))}
The problem I have is that it only allows exact match on the first two
lookups, I can not change the type from 0 to 1 or -1 to allow for a not
exact match like I have done in the third lookup. Column A is a name for
fifferent pricelists,Column B is length in kilometers and Row 1 is weight
in
kilos. First I lokkup which pricelist to use then the length and then the
weight.
Any ideas?

My pricelist looks something like this

A B C D E F
1 2500 5000 10000 20000
2 A 20 400 500 600 700
3 A 50 500 600 700 800
4 A 100 700 800 900 1000
5 B 20 100 200 300 400
6 B 50 200 300 400 500

TIA

Ola


--

Dave Peterson



  #4   Report Post  
Ola Sigurdh
 
Posts: n/a
Default

It worked like a charm.
Many thank´s

Ola

"Dave Peterson" skrev i meddelandet
...
Instead of concatenating the cells, I like this syntax for matching
multiple
columns better:

=index(othersheet!$c$1:$c$10,
match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet !$b$1:$b$100),0))

Maybe you could use the same sort of technique:

=INDEX(B93:E302;MATCH(1;(Pris!I2=A92:A301)*(Pris!G 2<=B92:B301);0);
MATCH(Pris!H2;92:92;1))

Then you can use whatever you want in this portion: (Pris!G2<=B92:B301)

(I would have guessed that column A had to be an exact match, but that's
just my
guess.)



Ola Sigurdh wrote:

Hello!
I use this formula to extract data from a pricelist. I found this formula
on
the net (thanks to whoever who made it).
{=INDEX(B93:E302;MATCH(Pris!I2&Pris!G2;A92:A301&B9 2:B301;0);Match(Pris!H2;92:92;1))}
The problem I have is that it only allows exact match on the first two
lookups, I can not change the type from 0 to 1 or -1 to allow for a not
exact match like I have done in the third lookup. Column A is a name for
fifferent pricelists,Column B is length in kilometers and Row 1 is weight
in
kilos. First I lokkup which pricelist to use then the length and then the
weight.
Any ideas?

My pricelist looks something like this

A B C D E F
1 2500 5000 10000 20000
2 A 20 400 500 600 700
3 A 50 500 600 700 800
4 A 100 700 800 900 1000
5 B 20 100 200 300 400
6 B 50 200 300 400 500

TIA

Ola


--

Dave Peterson



  #5   Report Post  
Domenic
 
Posts: n/a
Default

See if the following helps...

Assumptions:

A2:A6 contains the name of the pricelist

B2:B6 contains the length

C1:F1 contains the weight

C2:F6 contains your data


Formulas:

To lookup a value in Column B equal to the lookup value or next largest
value less than the lookup value...

=INDEX(C2:F6,LOOKUP(2,1/((A2:A6=H1)*(B2:B6=MAX((A2:A6=H1)*(B2:B6<=I1)*B2:
B6))),ROW(A2:A6)-ROW(A2)+1),MATCH(J1,C1:F1,1))

or

=INDEX(C2:F6,MATCH(1,((A2:A6=H1)*(B2:B6=MAX(IF((A2 :A6=H1)*(B2:B6<=I1),B2:
B6)))),0),MATCH(J1,C1:F1,1))

....confirmed with CONTROL+SHIFT+ENTER.

To lookup a value in Column B equal to the lookup value or the smallest
value greater than the lookup value...

=INDEX(C2:F6,MATCH(1,((A2:A6=H1)*(B2:B6=MIN(IF((A2 :A6=H1)*(B2:B6=I1),B2:
B6)))),0),MATCH(J1,C1:F1,1))

....confirmed with CONTROL+SHIFT+ENTER.

Note that H1 contains the name of the pricelist, I1 contains the length,
and J1 contains the weight.

Hope this helps!

In article ,
"Ola Sigurdh" wrote:

Hello!
I use this formula to extract data from a pricelist. I found this formula on
the net (thanks to whoever who made it).
{=INDEX(B93:E302;MATCH(Pris!I2&Pris!G2;A92:A301&B9 2:B301;0);Match(Pris!H2;92:9
2;1))}
The problem I have is that it only allows exact match on the first two
lookups, I can not change the type from 0 to 1 or -1 to allow for a not
exact match like I have done in the third lookup. Column A is a name for
fifferent pricelists,Column B is length in kilometers and Row 1 is weight in
kilos. First I lokkup which pricelist to use then the length and then the
weight.
Any ideas?

My pricelist looks something like this

A B C D E F
1 2500 5000 10000 20000
2 A 20 400 500 600 700
3 A 50 500 600 700 800
4 A 100 700 800 900 1000
5 B 20 100 200 300 400
6 B 50 200 300 400 500


TIA

Ola



  #6   Report Post  
Domenic
 
Posts: n/a
Default

Please ignore...

In article ,
Domenic wrote:

See if the following helps...

Assumptions:

A2:A6 contains the name of the pricelist

B2:B6 contains the length

C1:F1 contains the weight

C2:F6 contains your data


Formulas:

To lookup a value in Column B equal to the lookup value or next largest
value less than the lookup value...

=INDEX(C2:F6,LOOKUP(2,1/((A2:A6=H1)*(B2:B6=MAX((A2:A6=H1)*(B2:B6<=I1)*B2:
B6))),ROW(A2:A6)-ROW(A2)+1),MATCH(J1,C1:F1,1))

or

=INDEX(C2:F6,MATCH(1,((A2:A6=H1)*(B2:B6=MAX(IF((A2 :A6=H1)*(B2:B6<=I1),B2:
B6)))),0),MATCH(J1,C1:F1,1))

...confirmed with CONTROL+SHIFT+ENTER.

To lookup a value in Column B equal to the lookup value or the smallest
value greater than the lookup value...

=INDEX(C2:F6,MATCH(1,((A2:A6=H1)*(B2:B6=MIN(IF((A2 :A6=H1)*(B2:B6=I1),B2:
B6)))),0),MATCH(J1,C1:F1,1))

...confirmed with CONTROL+SHIFT+ENTER.

Note that H1 contains the name of the pricelist, I1 contains the length,
and J1 contains the weight.

Hope this helps!

In article ,
"Ola Sigurdh" wrote:

Hello!
I use this formula to extract data from a pricelist. I found this formula
on
the net (thanks to whoever who made it).
{=INDEX(B93:E302;MATCH(Pris!I2&Pris!G2;A92:A301&B9 2:B301;0);Match(Pris!H2;92
:9
2;1))}
The problem I have is that it only allows exact match on the first two
lookups, I can not change the type from 0 to 1 or -1 to allow for a not
exact match like I have done in the third lookup. Column A is a name for
fifferent pricelists,Column B is length in kilometers and Row 1 is weight
in
kilos. First I lokkup which pricelist to use then the length and then the
weight.
Any ideas?

My pricelist looks something like this

A B C D E F
1 2500 5000 10000 20000
2 A 20 400 500 600 700
3 A 50 500 600 700 800
4 A 100 700 800 900 1000
5 B 20 100 200 300 400
6 B 50 200 300 400 500


TIA

Ola

  #7   Report Post  
Vincnet.
 
Posts: n/a
Default

see my answer on your former post...

--
A+

V.


"Ola Sigurdh" wrote:

Hello!
I use this formula to extract data from a pricelist. I found this formula on
the net (thanks to whoever who made it).
{=INDEX(B93:E302;MATCH(Pris!I2&Pris!G2;A92:A301&B9 2:B301;0);Match(Pris!H2;92:92;1))}
The problem I have is that it only allows exact match on the first two
lookups, I can not change the type from 0 to 1 or -1 to allow for a not
exact match like I have done in the third lookup. Column A is a name for
fifferent pricelists,Column B is length in kilometers and Row 1 is weight in
kilos. First I lokkup which pricelist to use then the length and then the
weight.
Any ideas?

My pricelist looks something like this

A B C D E F
1 2500 5000 10000 20000
2 A 20 400 500 600 700
3 A 50 500 600 700 800
4 A 100 700 800 900 1000
5 B 20 100 200 300 400
6 B 50 200 300 400 500


TIA

Ola



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup Function help marlea Excel Discussion (Misc queries) 2 August 23rd 05 07:30 PM
formula to lookup table in another Worksheet please Steved Excel Worksheet Functions 1 June 14th 05 10:39 AM
Lookup formula Esrei Excel Discussion (Misc queries) 1 April 1st 05 02:36 PM
Can't find the right lookup formula for this bankscl Excel Worksheet Functions 4 March 28th 05 06:27 PM
Formula Question... LookUP G Excel Discussion (Misc queries) 4 March 7th 05 01:38 AM


All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"