Return a array

MoonBlade

New Member
Joined
Nov 17, 2011
Messages
1
Hey,

I need a function that can do the following:
I have two culoms of numbers temp and pressure.
I want to find the max pressure for each temp.
I want to do some thing like this:
A B
1 200 3
2 200 4
3 300 1
4 300 5

=Max(?????(a1:a4=200,b1:b4))
So ????? returns the array b1:b2
It should also work in situation like this.

A B
1 200 3
2 200 4
3 300 1
4 200 5

?????(a1:a4=200;b1:b4) returns b1,b2,b4
giving Max(?????(a1:a4=200;b1:b4))=5
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
try:

=Max(IF(a1:a4=200,b1:b4))

BUT

You have to register the function by pressing ctrl+shift+enter, rather than just enter

This creates an array formula and should deliver the result you're after.

It should look like:

{=MAX(IF(A1:A4=200,B1:B4))}

in the formula bar.
 
Upvote 0

Forum statistics

Threads
1,221,448
Messages
6,159,922
Members
451,604
Latest member
SWahl

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