Maximum with condition

MetLife

Active Member
Joined
Jul 2, 2012
Messages
334
Office Version
  1. 365
Hi,

I have 2 columns of data. I want to find the largest value in column A (these are integers) but column B has to be equal to the text "death" in the corresponding row. There are around 1000 rows of data.

Do you know if there is a formula to do this?

Also is there a way of getting the "k"th largest if the corresponding value is "death" in column B?

Thanks,
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
How about
Excel Formula:
=maxifs(a:a,b:b,"death")
 
Upvote 0
Solution
How about?:

HighLowDataPoints.xlsx
ABCDE
1IntTextLargest Int8
21something
32deathN2
43somethingN largest4
54death
65zap!
76kapow!
87crunch!
98death
Sheet3
Cell Formulas
RangeFormula
E1E1=MAX(A2:A9*(B2:B9="death"))
E4E4=LARGE(A2:A9*(B2:B9="death"), E3)
 
Upvote 1

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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