Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Double Lookup Without Exact Match-Price Breaks

Hello,

I have a table that looks like this

-----A------------B-----------C-------
Part Number------Qty-------Price Each
1----Part 1---------2-------------23.01
2----Part 1--------40------------8.76
3----Part 1--------80-----------8.39
4----Part 2--------1-------------58.12
5----Part 2--------20-----------9.04
6----Part 2--------40-----------7.74
7----Part 3--------1------------60.00
8----Part 3--------20----------9.04
9----Part 3--------40----------7.74
And so on....

These are price breaks. I'd like to enter the Part number in cell G1
and the Qty in cell H1 and have the formula/array lookup the Price
Each. I searched the newsgroups and found the following article about
a "double lookup":

http://www.mvps.org/dmcritchie/excel/vlookup.htm

...and used the following formula:

=INDEX(C2:C10,MATCH(1,(A2:A10=G1)*(B2:B10=H1),0))

This works great if the quantity is an exact match. If I input Part 2
Qty 20, I get $9.04.

However, if I enter Part 2 Qty 21, I get an N/A since there isn't an
exact match

I thought I could change the match type of the array (the last 0) to
an approximate match, but I either get a N/A when I change it to -1 or
0, or the last value in column C if I change it to 1. Can I change
this array so I can get an approximate match so if I enter Part 2 Qty
21, I get $9.04 or Part 2 Qty 3 $58.12?

Any help would be greatly appreciated.

Thank You,

-Chad

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Double Lookup Without Exact Match-Price Breaks

You have a response at your other post.

wrote:

Hello,

I have a table that looks like this

-----A------------B-----------C-------
Part Number------Qty-------Price Each
1----Part 1---------2-------------23.01
2----Part 1--------40------------8.76
3----Part 1--------80-----------8.39
4----Part 2--------1-------------58.12
5----Part 2--------20-----------9.04
6----Part 2--------40-----------7.74
7----Part 3--------1------------60.00
8----Part 3--------20----------9.04
9----Part 3--------40----------7.74
And so on....

These are price breaks. I'd like to enter the Part number in cell G1
and the Qty in cell H1 and have the formula/array lookup the Price
Each. I searched the newsgroups and found the following article about
a "double lookup":

http://www.mvps.org/dmcritchie/excel/vlookup.htm

..and used the following formula:

=INDEX(C2:C10,MATCH(1,(A2:A10=G1)*(B2:B10=H1),0))

This works great if the quantity is an exact match. If I input Part 2
Qty 20, I get $9.04.

However, if I enter Part 2 Qty 21, I get an N/A since there isn't an
exact match

I thought I could change the match type of the array (the last 0) to
an approximate match, but I either get a N/A when I change it to -1 or
0, or the last value in column C if I change it to 1. Can I change
this array so I can get an approximate match so if I enter Part 2 Qty
21, I get $9.04 or Part 2 Qty 3 $58.12?

Any help would be greatly appreciated.

Thank You,

-Chad


--

Dave Peterson
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
How to get exact match with LOOKUP function? s51janez Excel Worksheet Functions 1 October 2nd 08 01:21 PM
Vlookup- Closest match that contains the exact lookup value? Muthanna Excel Worksheet Functions 0 June 18th 08 03:15 PM
Lookup Exact Match Keep It Simple Stupid Excel Worksheet Functions 8 February 20th 08 07:31 PM
Lookup and Match with not exact numbers Jon Dow Excel Worksheet Functions 3 February 23rd 07 03:54 AM
Match - Exact - Lookup? Danny Excel Worksheet Functions 5 April 27th 06 10:04 PM


All times are GMT +1. The time now is 06:28 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"