meet criteria between ranges

jmnpinheiro

New Member
Joined
Sep 11, 2014
Messages
4
Hi,
I want to test a criteria between range A (column A) and range B (column B).
So, for every A value I want it to test the condition, say "IF A+B > 10, write sum result to column C".
The problem is that I want every A values to be tested with every B values (not only the ones in same lines).
Of couse, column C could result bigger than A and B columns.
I tried:
={IF(A1:A$20+B1:B$20>10;A1+B1;"")}
={IF(A$1:A$20+B$1:B$20>10;A1+B1;"")}
={IF(A1:A$20+B1:B$20>10;A1+B1;"")}
and many more array variations...
I think I'm not even close :(
Thanks in advance
 

Some videos you may like

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,840
Hi
Welcome to the board

Try this array formula in C1:

=SMALL(IF($A$1:$A$20+TRANSPOSE($B$1:$B$20)>10,$A$1:$A$20+TRANSPOSE($B$1:$B$20)),ROWS($C$1:C1))

Copy down
 

jmnpinheiro

New Member
Joined
Sep 11, 2014
Messages
4
I really appreciated your welcome words. Your suggestion gracefully solved my thread. I tested it using several list dimensions (A>B, A=B and A<B) and one just have to predict final array size and drag down. Completely dynamic, as I intended. Now I'll have to dig some more about all applied syntax. Thank You Very Much.
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,840
I really appreciated your welcome words. Your suggestion gracefully solved my thread. I tested it using several list dimensions (A>B, A=B and A<B) and one just have to predict final array size drag down. completely dynamic, as i intended. now i'll dig some more about all applied syntax. thank you very much.

I'm glad it helped. Thanks for the feedback.


P. S. the html sometimes messes things up when you use the < symbol. A simple way to go around it is to add a space before and after.
 

jmnpinheiro

New Member
Joined
Sep 11, 2014
Messages
4
I tested it using several list dimensions (A greater B, A equal B and A smaller B) and one just have to predict final array size and drag down.
Completely dynamic, as I intended.
Now I'll have to dig some more about all applied syntax ;)
 

Watch MrExcel Video

Forum statistics

Threads
1,109,161
Messages
5,527,156
Members
409,750
Latest member
BorisYeltsin

This Week's Hot Topics

Top