Return highest value

Peter1973

Well-known Member
Joined
May 13, 2006
Messages
963
Office Version
  1. 365
I am looking to look in A1:Z1 for any cells that = A5 and then for those cells return the highest value from A2:Z2.

any help appreciated.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi, you could try:

Excel Formula:
=MAXIFS(A2:Z2,A1:Z1,A5)
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

If you have Excel 2019 or newer, you can use the new MAXIFS formula like FormR showed.
Here is a link to details on that: MAXIFS function - Microsoft Support
 
Upvote 0
Hi, here's a demo, if you are getting different results it would be helpful if you posted some sample data.

Book2
ABCDEFG
1aaba
2999991
3
4
5a
699
Sheet1
Cell Formulas
RangeFormula
A6A6=MAXIFS(A2:Z2,A1:Z1,A5)
 
Upvote 0
Thanks this seems to not pull the highest value but the last one ie the data from Z2
Are you sure that the values in row 2 are valid numbers, and not "numbers entered as text"?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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