Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Default Help needed: Minimum value based upon either/or criteria

Hi all,

I'm trying to find a minimum value in one column (A) for all records in which columns B or C are equal to a cell reference in a separate worksheet. I've tried something like: =MIN(IF(OR(COLUMN B option, Column C option),Column A range)). But it's only giving me zeros which I know are not correct.

Any ideas?

Thanks in advance.

M
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default Help needed: Minimum value based upon either/or criteria

Il 31/10/2012 07:03, Mfreit ha scritto:
Hi all,

I'm trying to find a minimum value in one column (A) for all records in
which columns B or C are equal to a cell reference in a separate
worksheet. I've tried something like: =MIN(IF(OR(COLUMN B option, Column
C option),Column A range)). But it's only giving me zeros which I know
are not correct.

Any ideas?

Thanks in advance.

M





You must only confirm that formula pressing CONTROL+SHIFT+ENTER.

E.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default Help needed: Minimum value based upon either/or criteria

"Mfreit" wrote:
I'm trying to find a minimum value in one column (A)
for all records in which columns B or C are equal to
a cell reference in a separate worksheet. I've tried
something like: =MIN(IF(OR(COLUMN B option, Column
C option),Column A range)). But it's only giving me
zeros which I know are not correct.


There are two potential problems:

1. Formulas of that form must be array-entered, which means you must press
ctrl+shift+Enter instead of just Enter.

2. OR() does not work as intended in formulas of that form. You want to
process row by row, but OR() will process the entire array argument, even if
the formula is array-entered.

An array-entered formula of the following form should do what you want
(press ctrl+shift+Enter instead of just Enter):

=MIN(IF((B1:B1000=Sheet2!X1)+(C1:C1000=Sheet2!X2) 0,A1:A1000))

Each comparison returns TRUE or FALSE. The arithmetic operation (plus)
converts TRUE and FALSE into 1 and 0. The above conditional expression is
zero only if both comparisons are FALSE row by row.

  #4   Report Post  
Junior Member
 
Posts: 3
Default

joeu2004,

Thank you so much, that worked like a charm. Can't tell you how frustrating that formula had been for me. And it's good to know about the OR function not working in functions of that type.

Cheers,

M


Quote:
Originally Posted by joeu2004[_2_] View Post
"Mfreit"

There are two potential problems:

1. Formulas of that form must be array-entered, which means you must press
ctrl+shift+Enter instead of just Enter.

2. OR() does not work as intended in formulas of that form. You want to
process row by row, but OR() will process the entire array argument, even if
the formula is array-entered.

An array-entered formula of the following form should do what you want
(press ctrl+shift+Enter instead of just Enter):

=MIN(IF((B1:B1000=Sheet2!X1)+(C1:C1000=Sheet2!X2) 0,A1:A1000))

Each comparison returns TRUE or FALSE. The arithmetic operation (plus)
converts TRUE and FALSE into 1 and 0. The above conditional expression is
zero only if both comparisons are FALSE row by row.
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 reference a cell based on the minimum of division of two cells, please help? Ledzep898 Excel Worksheet Functions 0 June 27th 12 01:28 AM
Minimum With Two Criteria goss[_2_] Excel Discussion (Misc queries) 3 November 3rd 08 11:23 PM
Returning contents of a cell based upon the minimum value in a ran Shawn Excel Worksheet Functions 4 September 2nd 07 08:48 PM
find minimum of range based on multiple criteria Weissme Excel Worksheet Functions 3 May 21st 06 05:21 PM
Minimum and Maximum with Complex Criteria [email protected] Excel Discussion (Misc queries) 4 December 16th 05 06:33 PM


All times are GMT +1. The time now is 08:13 AM.

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"