I had a formula that worked in Libreoffice that no longer works after transferring to Sheets, as it used the Aggregate formula. Someone else made it for me and I don't know exactly how to replicate it.

Basically what I need to do is find the largest value in one column, based on criteria in a second column, but return the text in a third column as the result.

I'll give an example.

```
A                B              C      
-----------------------------------
Apple            3              Q1
-----------------------------------
Orange           4              Q1
-----------------------------------
Pear             6              Q1
-----------------------------------
Banana           3              Q1
-----------------------------------
Apple            9              Q2

```

The formula I need would result in "Pear" based on the criteria that it is the highest number in B, because it only searched "Q1" in column C.

Basically, I want the highest "B" number but also limiting what I look for in "C", and displaying the result at the text in "A".

I had a really long Aggregate formula that worked wonderfully but, like I said, moving to Sheets doesn't allow it to be used. I'm sure there's a pretty simple way to do this but I'm not smart enough to find it.

Thanks for the help!

Edit: Here is the original formula:

> 
> =INDEX(A2:A,AGGREGATE(15,6,(ROW(A2:A)-ROW(A2)+1)/((C2:C="Q1")*(B2:B=AGGREGATE(14,6,B2:B/(ISNUMBER(B2:B)*(C2:C="Q1")),1))),1)))
> 
> 
>