#1   Report Post  
Posted to microsoft.public.excel.misc
Squeaky
 
Posts: n/a
Default Lookup, Max, Array

I get lot of help from you all reading these postings. I'm a bit stuck on
this one.
I have a spreadsheet containing part numbers and prices. Since this
spreadsheet is created from a database I am unable to modify it. This
spreadsheet is called "Prices". On many occasions the same part number (in
col A) is repeated up to 5 times with up to 3 different prices on collumns b,
c d. (see ref). On another sheet in the same workbook I want to be able to
look up a given part number, and have the highest price returned. (For
Part=107 Price=$1.25, For Part=111 Price=$2.05)

Part# Price1 Price2 Price3
107 $.50 $.75 $.50
107 $.50 $1.25 $.50
111 $1.50 $1.50 $1.75
111 $1.55 $1.50 $0.00
111 $2.05 $1.50 $1.75

Thanks!
Squeaky
  #2   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default Lookup, Max, Array

This adds some complexity, but it may do the trick:
1.- Create a new column at the end to get the max of the three prices
2.- Create a pivot table over the whole range, including the part# and the
max of the prices
3.- In the layout, just drag the part# on the rows and the max of the column
with the maximum in the data section.
4.- If you need this info outside the table, use GETPIVOTDATA() over the table

Miguel.

"Squeaky" wrote:

I get lot of help from you all reading these postings. I'm a bit stuck on
this one.
I have a spreadsheet containing part numbers and prices. Since this
spreadsheet is created from a database I am unable to modify it. This
spreadsheet is called "Prices". On many occasions the same part number (in
col A) is repeated up to 5 times with up to 3 different prices on collumns b,
c d. (see ref). On another sheet in the same workbook I want to be able to
look up a given part number, and have the highest price returned. (For
Part=107 Price=$1.25, For Part=111 Price=$2.05)

Part# Price1 Price2 Price3
107 $.50 $.75 $.50
107 $.50 $1.25 $.50
111 $1.50 $1.50 $1.75
111 $1.55 $1.50 $0.00
111 $2.05 $1.50 $1.75

Thanks!
Squeaky

  #3   Report Post  
Posted to microsoft.public.excel.misc
Cutter
 
Posts: n/a
Default Lookup, Max, Array


If your part numbers are sorted so that all matches are together then
you can try something like this:

Assuming your data starts in A2

=MAX(OFFSET(A1,MATCH(G1,A2:A50,0),1,COUNTIF(A2:A50 ,G1),3))

The part number to be checked is in G1 for this sample formula


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=532767

  #4   Report Post  
Posted to microsoft.public.excel.misc
Camilo
 
Posts: n/a
Default Lookup, Max, Array

Use the following conditional array function (below) in any cell you wish
(you will need to add a column to your list that finds the max for each
record (ie. =MAX(B2:D2) in row 2), in order for this array function to work.

The curly brackets around the array function let you know that it is an
array function. After you've entered the formula (without curly brackets)
press Ctrl+Shift+Enter and the curly bracket will appear. The example below
applies to Part# 107)

{=MAX(IF($A$2:$A$6=107,E2:E6,0))}
--
Hope this Helps!
Camilo

Objective: To help one person each day!

Feedback is greatly appreciated! Please let me know if I've answered your
question or if my post was helpful to you?


"Squeaky" wrote:

I get lot of help from you all reading these postings. I'm a bit stuck on
this one.
I have a spreadsheet containing part numbers and prices. Since this
spreadsheet is created from a database I am unable to modify it. This
spreadsheet is called "Prices". On many occasions the same part number (in
col A) is repeated up to 5 times with up to 3 different prices on collumns b,
c d. (see ref). On another sheet in the same workbook I want to be able to
look up a given part number, and have the highest price returned. (For
Part=107 Price=$1.25, For Part=111 Price=$2.05)

Part# Price1 Price2 Price3
107 $.50 $.75 $.50
107 $.50 $1.25 $.50
111 $1.50 $1.50 $1.75
111 $1.55 $1.50 $0.00
111 $2.05 $1.50 $1.75

Thanks!
Squeaky

  #5   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Lookup, Max, Array

Another one:

E1 = 107

=MAX(IF(A2:A6=E1,B2:D6))

Biff

"Squeaky" wrote in message
...
I get lot of help from you all reading these postings. I'm a bit stuck on
this one.
I have a spreadsheet containing part numbers and prices. Since this
spreadsheet is created from a database I am unable to modify it. This
spreadsheet is called "Prices". On many occasions the same part number (in
col A) is repeated up to 5 times with up to 3 different prices on collumns
b,
c d. (see ref). On another sheet in the same workbook I want to be able to
look up a given part number, and have the highest price returned. (For
Part=107 Price=$1.25, For Part=111 Price=$2.05)

Part# Price1 Price2 Price3
107 $.50 $.75 $.50
107 $.50 $1.25 $.50
111 $1.50 $1.50 $1.75
111 $1.55 $1.50 $0.00
111 $2.05 $1.50 $1.75

Thanks!
Squeaky





  #6   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Lookup, Max, Array

BTW, this is an array formula. It needs to be entered using the key combo of
CTRL.SHIFT,ENTER.

Biff

"Biff" wrote in message
...
Another one:

E1 = 107

=MAX(IF(A2:A6=E1,B2:D6))

Biff

"Squeaky" wrote in message
...
I get lot of help from you all reading these postings. I'm a bit stuck on
this one.
I have a spreadsheet containing part numbers and prices. Since this
spreadsheet is created from a database I am unable to modify it. This
spreadsheet is called "Prices". On many occasions the same part number
(in
col A) is repeated up to 5 times with up to 3 different prices on
collumns b,
c d. (see ref). On another sheet in the same workbook I want to be able
to
look up a given part number, and have the highest price returned. (For
Part=107 Price=$1.25, For Part=111 Price=$2.05)

Part# Price1 Price2 Price3
107 $.50 $.75 $.50
107 $.50 $1.25 $.50
111 $1.50 $1.50 $1.75
111 $1.55 $1.50 $0.00
111 $2.05 $1.50 $1.75

Thanks!
Squeaky





  #7   Report Post  
Posted to microsoft.public.excel.misc
Camilo
 
Posts: n/a
Default Lookup, Max, Array

Biff go it!
--
Hope this Helps!
Camilo

Objective: To help one person each day!

Feedback is greatly appreciated! Please let me know if I've answered your
question or if my post was helpful to you?


"Biff" wrote:

Another one:

E1 = 107

=MAX(IF(A2:A6=E1,B2:D6))

Biff

"Squeaky" wrote in message
...
I get lot of help from you all reading these postings. I'm a bit stuck on
this one.
I have a spreadsheet containing part numbers and prices. Since this
spreadsheet is created from a database I am unable to modify it. This
spreadsheet is called "Prices". On many occasions the same part number (in
col A) is repeated up to 5 times with up to 3 different prices on collumns
b,
c d. (see ref). On another sheet in the same workbook I want to be able to
look up a given part number, and have the highest price returned. (For
Part=107 Price=$1.25, For Part=111 Price=$2.05)

Part# Price1 Price2 Price3
107 $.50 $.75 $.50
107 $.50 $1.25 $.50
111 $1.50 $1.50 $1.75
111 $1.55 $1.50 $0.00
111 $2.05 $1.50 $1.75

Thanks!
Squeaky




  #8   Report Post  
Posted to microsoft.public.excel.misc
Squeaky
 
Posts: n/a
Default Lookup, Max, Array

Thanks for all the replies. I tried the last one from Biff. Works like a charm!

-Squeaky

"Squeaky" wrote:

I get lot of help from you all reading these postings. I'm a bit stuck on
this one.
I have a spreadsheet containing part numbers and prices. Since this
spreadsheet is created from a database I am unable to modify it. This
spreadsheet is called "Prices". On many occasions the same part number (in
col A) is repeated up to 5 times with up to 3 different prices on collumns b,
c d. (see ref). On another sheet in the same workbook I want to be able to
look up a given part number, and have the highest price returned. (For
Part=107 Price=$1.25, For Part=111 Price=$2.05)

Part# Price1 Price2 Price3
107 $.50 $.75 $.50
107 $.50 $1.25 $.50
111 $1.50 $1.50 $1.75
111 $1.55 $1.50 $0.00
111 $2.05 $1.50 $1.75

Thanks!
Squeaky

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
VLOOKUP CONDITION TO RETURN BLANK CELL WHERE LOOKUP VALUE IS NOT IN TABLE ARRAY Scott Lolmaugh Excel Worksheet Functions 3 March 9th 06 11:05 PM
Lookup "greater than or equal to" in lookup array icemouse New Users to Excel 3 February 16th 06 10:07 PM
Lookup array? HBj Excel Worksheet Functions 2 January 4th 06 02:47 PM
How do I lookup a value in a array that is not in ascending order John Excel Worksheet Functions 6 June 20th 05 09:40 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM


All times are GMT +1. The time now is 12:30 PM.

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

About Us

"It's about Microsoft Excel"