Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Return Min based on 2 conditions

Hello,

I am trying to return the Min in one column, based on criteria in 2 other
columns. Example:

Title Region Pay
SM NJ $10
SM PA $11
SM NJ $9

I want to return the min value for the title "SM" in "NJ", which in this
small example would be $9. I will eventually need to get the Average and Max
as well.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Return Min based on 2 conditions

Use a helper column:

In D2 enter:
=IF(AND(A2="SM",B2="NJ"),C2,"") and copy down

Then just use:
=MIN(D2:D100)
or
=MAX(D2:D100)
or
=AVERAGE(D2:D100)

--
Gary''s Student - gsnu200774


"John" wrote:

Hello,

I am trying to return the Min in one column, based on criteria in 2 other
columns. Example:

Title Region Pay
SM NJ $10
SM PA $11
SM NJ $9

I want to return the min value for the title "SM" in "NJ", which in this
small example would be $9. I will eventually need to get the Average and Max
as well.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Return Min based on 2 conditions

Try these array formulas** :

Min:

=MIN(IF((A2:A4="SM")*(B2:B4="NJ")*(C2:C4<""),C2:C 4))

Max:

=MAX(IF((A2:A4="SM")*(B2:B4="NJ"),C2:C4))

Average:

=AVERAGE(IF((A2:A4="SM")*(B2:B4="NJ")*(C2:C4<""), C2:C4))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)


--
Biff
Microsoft Excel MVP


"John" wrote in message
...
Hello,

I am trying to return the Min in one column, based on criteria in 2 other
columns. Example:

Title Region Pay
SM NJ $10
SM PA $11
SM NJ $9

I want to return the min value for the title "SM" in "NJ", which in this
small example would be $9. I will eventually need to get the Average and
Max
as well.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Return Min based on 2 conditions

Worked perfectly! Thanks!

"T. Valko" wrote:

Try these array formulas** :

Min:

=MIN(IF((A2:A4="SM")*(B2:B4="NJ")*(C2:C4<""),C2:C 4))

Max:

=MAX(IF((A2:A4="SM")*(B2:B4="NJ"),C2:C4))

Average:

=AVERAGE(IF((A2:A4="SM")*(B2:B4="NJ")*(C2:C4<""), C2:C4))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)


--
Biff
Microsoft Excel MVP


"John" wrote in message
...
Hello,

I am trying to return the Min in one column, based on criteria in 2 other
columns. Example:

Title Region Pay
SM NJ $10
SM PA $11
SM NJ $9

I want to return the min value for the title "SM" in "NJ", which in this
small example would be $9. I will eventually need to get the Average and
Max
as well.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Return Min based on 2 conditions

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"John" wrote in message
...
Worked perfectly! Thanks!

"T. Valko" wrote:

Try these array formulas** :

Min:

=MIN(IF((A2:A4="SM")*(B2:B4="NJ")*(C2:C4<""),C2:C 4))

Max:

=MAX(IF((A2:A4="SM")*(B2:B4="NJ"),C2:C4))

Average:

=AVERAGE(IF((A2:A4="SM")*(B2:B4="NJ")*(C2:C4<""), C2:C4))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)


--
Biff
Microsoft Excel MVP


"John" wrote in message
...
Hello,

I am trying to return the Min in one column, based on criteria in 2
other
columns. Example:

Title Region Pay
SM NJ $10
SM PA $11
SM NJ $9

I want to return the min value for the title "SM" in "NJ", which in
this
small example would be $9. I will eventually need to get the Average
and
Max
as well.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to return a result from 2 conditions? Christy Excel Worksheet Functions 2 July 9th 07 04:42 PM
shade cells based on conditions - i have more than 3 conditions Mo2 Excel Worksheet Functions 3 March 30th 07 07:19 AM
Counting based upon 2 conditions that are text based walkerdayle Excel Discussion (Misc queries) 7 August 22nd 06 01:29 AM
How do I return a value based on multiple possible conditions? nevermore627 Excel Worksheet Functions 4 July 21st 06 01:14 AM
Formula to return cell contents based on multiple conditions Bill Excel Worksheet Functions 3 January 19th 05 09:59 AM


All times are GMT +1. The time now is 06:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"