Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Max with Multiple Ifs

Hello All,

I need a Max statement with multiple ifs.

Take for instance the example below, I need only the Max IF A=1 and C
= 1. I've tried formulas like {=MAX(IF(Sheet1!A:A=A2, Sheet1!C:C, IF
(Sheet1!E:E="yes", Sheet1!C:C)))} and {=IF(Sheet1!A:A=78, MAX(IF
(Sheet1!E:E="yes",Sheet1!C:C)))}, but I've had no luck so far.

So basically, for all values of A which are 1, I need the Max of B, if
C is also 1, then for all values of A which are 2, I need the Max of B
if C is 1, etc.

Thanks,

Chris

Example:

A B C

1 5 1

1 3 1

1 2 0

2 3 1

2 6 0

3 2 1

3 5 0

3 3 1
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Max with Multiple Ifs

So what I'm looking for here is for when A=1 the cell will equal 5,
when A=2 the cell should say 2, and when A=3, the cell should say 3.

On Jul 21, 3:47*pm, ChrisWWiese wrote:
*Hello All,

I need a Max statement with multiple ifs.

Take for instance the example below, I need only the Max IF A=1 and C
= 1. I've tried formulas like {=MAX(IF(Sheet1!A:A=A2, Sheet1!C:C, IF
(Sheet1!E:E="yes", Sheet1!C:C)))} and {=IF(Sheet1!A:A=78, MAX(IF
(Sheet1!E:E="yes",Sheet1!C:C)))}, but I've had no luck so far.

So basically, for all values of A which are 1, I need the Max of B, if
C is also 1, then for all values of A which are 2, I need the Max of B
if C is 1, etc.

Thanks,

Chris

Example:

A * * * * B * * * * C

1 * * * * 5 * * * * *1

1 * * * * 3 * * * * *1

1 * * * * 2 * * * * *0

2 * * * * 3 * * * * *1

2 * * * * 6 * * * * *0

3 * * * * 2 * * * * *1

3 * * * * 5 * * * * *0

3 * * * * 3 * * * * *1


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default Max with Multiple Ifs

On Tue, 21 Jul 2009 12:51:27 -0700 (PDT), ChrisWWiese
wrote:

So what I'm looking for here is for when A=1 the cell will equal 5,
when A=2 the cell should say 2, and when A=3, the cell should say 3.

On Jul 21, 3:47*pm, ChrisWWiese wrote:
*Hello All,

I need a Max statement with multiple ifs.

Take for instance the example below, I need only the Max IF A=1 and C
= 1. I've tried formulas like {=MAX(IF(Sheet1!A:A=A2, Sheet1!C:C, IF
(Sheet1!E:E="yes", Sheet1!C:C)))} and {=IF(Sheet1!A:A=78, MAX(IF
(Sheet1!E:E="yes",Sheet1!C:C)))}, but I've had no luck so far.

So basically, for all values of A which are 1, I need the Max of B, if
C is also 1, then for all values of A which are 2, I need the Max of B
if C is 1, etc.

Thanks,

Chris

Example:

A * * * * B * * * * C

1 * * * * 5 * * * * *1

1 * * * * 3 * * * * *1

1 * * * * 2 * * * * *0

2 * * * * 3 * * * * *1

2 * * * * 6 * * * * *0

3 * * * * 2 * * * * *1

3 * * * * 5 * * * * *0

3 * * * * 3 * * * * *1



Try the following formula:

=MAX((B$1:B$100)*(A$1:A$100=x)*(C$1:C$100=1))

Note: This is an array formula that has to be cofirmed with
CTRL+SHIFT+ENTER rather than just ENTER.

Replace the 100 on three places to suit the number of data rows in
column A,B, and C.

Change the "x" to 1, 2, or 3 to get the different results you expect
(or replace "x" with a cell reference, e.g. D1 where you put the
number.

Hope this helps / Lars-Åke
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Max with Multiple Ifs

On Jul 21, 3:59*pm, Lars-Åke Aspelin
wrote:
On Tue, 21 Jul 2009 12:51:27 -0700 (PDT), ChrisWWiese





wrote:
So what I'm looking for here is for when A=1 the cell will equal 5,
when A=2 the cell should say 2, and when A=3, the cell should say 3.


On Jul 21, 3:47*pm, ChrisWWiese wrote:
*Hello All,


I need a Max statement with multiple ifs.


Take for instance the example below, I need only the Max IF A=1 and C
= 1. I've tried formulas like {=MAX(IF(Sheet1!A:A=A2, Sheet1!C:C, IF
(Sheet1!E:E="yes", Sheet1!C:C)))} and {=IF(Sheet1!A:A=78, MAX(IF
(Sheet1!E:E="yes",Sheet1!C:C)))}, but I've had no luck so far.


So basically, for all values of A which are 1, I need the Max of B, if
C is also 1, then for all values of A which are 2, I need the Max of B
if C is 1, etc.


Thanks,


Chris


Example:


A * * * * B * * * * C


1 * * * * 5 * * * * *1


1 * * * * 3 * * * * *1


1 * * * * 2 * * * * *0


2 * * * * 3 * * * * *1


2 * * * * 6 * * * * *0


3 * * * * 2 * * * * *1


3 * * * * 5 * * * * *0


3 * * * * 3 * * * * *1


Try the following formula:

=MAX((B$1:B$100)*(A$1:A$100=x)*(C$1:C$100=1))

Note: This is an array formula that has to be cofirmed with
CTRL+SHIFT+ENTER rather than just ENTER.

Replace the 100 on three places to suit the number of data rows in
column A,B, and C.

Change the "x" to 1, 2, or 3 to get the different results you expect
(or replace "x" with a cell reference, e.g. D1 where you put the
number.

Hope this helps / Lars-Åke- Hide quoted text -

- Show quoted text -


That works! Thank you!
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
Setting multiple conditions to return a figure from multiple cells Sapper Excel Discussion (Misc queries) 4 April 26th 09 10:33 PM
Transposing Multiple Cell References to Multiple Values (NOT total LinLin Excel Discussion (Misc queries) 7 November 11th 07 10:57 PM
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents BenS Excel Discussion (Misc queries) 3 June 29th 07 12:20 AM
Display multiple lines of text within a cell from multiple column. Zeeshan Zaheer Excel Worksheet Functions 3 August 23rd 06 10:08 AM
view multiple files in multiple windows on multiple screens. tcom Excel Discussion (Misc queries) 7 September 15th 05 09:35 PM


All times are GMT +1. The time now is 02:03 PM.

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

About Us

"It's about Microsoft Excel"