Lookup a value and then find the largest in a range

fazthfc

New Member
Joined
May 6, 2015
Messages
4
Hi,

I have a set of data that looks like this:

Name12345
A121516106
B6415119
C2214131710
D687106
E8915264
F101419210
G1516202515
H162022108
I141619176

<tbody>
</tbody>

In another sheet I have the list of names but not in the same order (there is a reason for that). I want a formula that will look for the Name in column A and then return the largest number for that name in columns B:F.

For example:

Forumula looks at the name sees E and returns 26.

I've tried looking at HLOOKUP, MATCH and INDEX but can't find a way of looking at the range based on a specific criteria.

Any help greatly appreciated.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi,

I use the max formula on a line and set up the number of line with a match in the column. Indirect put them together.

Code:
=MAX(INDIRECT("Sheet1!$B$"&MATCH(Sheet2!A2;Sheet1!$A$1:$A$10)&":$F$"&MATCH(Sheet2!A2;Sheet1!$A$1:$A$10)))

I can go in more details if it does not work for you
 
Upvote 0
Hi faz,

Maybe this;


Book1
ABCDEF
1Name12345
2A121516106
3B6415119
4C2214131710
5D687106
6E8915264
7F101419210
8G1516202515
9H162022108
10I141619176
Sheet1



Book1
AB
1NameMax
2A16
3H22
4C22
5G25
6E26
7F19
8D10
9B19
10I19
Sheet2
Cell Formulas
RangeFormula
B2{=MAX(IF(Sheet1!$A$2:$A$10=A2,Sheet1!$B$2:$F$10))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hello,

With your Table in Sheet1 ... and your formula in Sheet2 ...

Cell A2 : B

Cell B2 :
Code:
=MAX(OFFSET(Sheet1!$A$1,MATCH(A2,Sheet1!$A$2:$A$10,0),1):OFFSET(Sheet1!$A$1,MATCH(A2,Sheet1!$A$2:$A$10,0),5))

Hope this will help
 
Upvote 0
Another option


Book1
ABCDEF
1Name12345
2A121516106
3B6415119
4C2214131710
5D687106
6E8915264
7F101419210
8G1516202515
9H162022108
10I141619176
Sheet1



Book1
AB
2A16
3C22
4F19
5G25
Sheet3
Cell Formulas
RangeFormula
B2=MAX(INDEX(Sheet1!$B$2:$F$10,MATCH(A2,Sheet1!$A$2:$A$10,0),0))
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top