# Array Formula Question - Condition An Array by Itself

#### grant1377

##### New Member
Hello! I'm trying to solve the following issue using an array formula but I'm struggling. I'm fairly versed with arrays but can't figure this out. Thank you in advance for the help!

Using the example below, I'd like to pull the max number associated with each individual text in the first column. E.g., 'Test 1' would be 9, 'Test 2' 8, and 'Test 3' 6. Then I'd like to return the max of that, which would be 9.

Is this possible using one single array formula? There are two paths that I thought could work to solve this, but I'm struggling to figure out how to use an array and then qualify that array by the array itself, if that makes sense. I'm struggling to even figure out what to search online to help find info on this.

For example, the formula below would work but only calculates the total for the text in A2, 'Test 1'. I essentially need a formula so that the array becomes: =max(sums Test 1,sums Test 1,sums test 2,sums test 2,sums test 3), and then =max(9,9,8,6).

=Sum((A2:A6)=A2)*(B2:B6))

 A B Test 1 5 Test 1 4 Test 2 1 Test 2 7 Test 3 6

<tbody>
</tbody>

Thank you! ray:

#### mikerickson

##### MrExcel MVP
The CSE formula =MAX(SUMIF(A1:A5,A1:A5,B1:B5)) will give you the max of Test1 total, Test2 total, Test3 total.

To convert that Test1, Test2, or Test 3
=INDEX(A1:A5, MATCH(MAX(SUMIF(A1:A5,A1:A5,B1:B5)),SUMIF(A1:A5,A1:A5,B1:B5),0), 1)

#### grant1377

##### New Member
Amazing. Such a simple solution - thank you!

1,078,440
Messages
5,340,296
Members
399,364
Latest member
farhan11941234

### This Week's Hot Topics

• Problem with Radio Button's format control
I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
• Last Display on userform to a Listbox
[CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
• Rename and move files to a new location
Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
• Help with True/False Formula
Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
• Clear extra characters from a provided range of cells
Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
• Help with Current and highest streaks
Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...