Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to add conditions to Match function?

Re-post Question


Does anyone have any suggestions on how to add conditions to Match function?
I get 4 numbers under the cell A1:A4, and I would like to determine which
number under cell A2:A4 is larger than cell A1 and closer to / equal to A1,
such as

Those numbers are 10[A1], 17[A2], 20[A3], 10[A4], then the number 10 should
be return in cell B1 in this case. On the other hands, if all numbers under
A2:A4 are smaller than A1, then returns the max number A2:A4 in cell B1.
Does anyone have any suggestions?
Thank you in advance
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default How to add conditions to Match function?

this appears to work okay

=MEDIAN(MIN(IF(A2:A4=A1,A2:A4)),MAX(A2:A4),A1)

array entered w/Ctrl+Shift+Enter

"Eric" wrote:

Re-post Question


Does anyone have any suggestions on how to add conditions to Match function?
I get 4 numbers under the cell A1:A4, and I would like to determine which
number under cell A2:A4 is larger than cell A1 and closer to / equal to A1,
such as

Those numbers are 10[A1], 17[A2], 20[A3], 10[A4], then the number 10 should
be return in cell B1 in this case. On the other hands, if all numbers under
A2:A4 are smaller than A1, then returns the max number A2:A4 in cell B1.
Does anyone have any suggestions?
Thank you in advance
Eric

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default How to add conditions to Match function?

Works for me!

Biff

"JMB" wrote in message
...
this appears to work okay

=MEDIAN(MIN(IF(A2:A4=A1,A2:A4)),MAX(A2:A4),A1)

array entered w/Ctrl+Shift+Enter

"Eric" wrote:

Re-post Question


Does anyone have any suggestions on how to add conditions to Match
function?
I get 4 numbers under the cell A1:A4, and I would like to determine which
number under cell A2:A4 is larger than cell A1 and closer to / equal to
A1,
such as

Those numbers are 10[A1], 17[A2], 20[A3], 10[A4], then the number 10
should
be return in cell B1 in this case. On the other hands, if all numbers
under
A2:A4 are smaller than A1, then returns the max number A2:A4 in cell B1.
Does anyone have any suggestions?
Thank you in advance
Eric



  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default How to add conditions to Match function?

Except that I now notice it will not work if A1 is positive or zero and the
numbers below it are all negative.

For the OP - can the numbers below A1 be negative?



"T. Valko" wrote:

Works for me!

Biff

"JMB" wrote in message
...
this appears to work okay

=MEDIAN(MIN(IF(A2:A4=A1,A2:A4)),MAX(A2:A4),A1)

array entered w/Ctrl+Shift+Enter

"Eric" wrote:

Re-post Question


Does anyone have any suggestions on how to add conditions to Match
function?
I get 4 numbers under the cell A1:A4, and I would like to determine which
number under cell A2:A4 is larger than cell A1 and closer to / equal to
A1,
such as

Those numbers are 10[A1], 17[A2], 20[A3], 10[A4], then the number 10
should
be return in cell B1 in this case. On the other hands, if all numbers
under
A2:A4 are smaller than A1, then returns the max number A2:A4 in cell B1.
Does anyone have any suggestions?
Thank you in advance
Eric




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 add conditions to Match function? Eric Excel Discussion (Misc queries) 2 June 8th 07 12:04 AM
Match 2 Conditions then Avg Range Ken Excel Discussion (Misc queries) 0 June 7th 07 12:35 PM
lookup with INDEX MATCH formule depending on 2 conditions Excel ESG Excel Worksheet Functions 6 June 7th 07 10:21 AM
index match array function-returning only first match, need last. Julie Olsen Excel Worksheet Functions 3 December 29th 06 12:50 AM
How do I sum numbers that match two conditions? ryesworld Excel Worksheet Functions 1 December 1st 05 04:46 PM


All times are GMT +1. The time now is 09:28 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"