how to set up formula with more than 1 result

O

ONG

How to how to set up formula with more than 1 result

For example

A

1 50
2 100
3 50
4 150
5 100
6 200


if i use =mode(A1:A6) the result is 50, what should i do to make it display
all result? I faced the same problem while using Vlook & Hlookup also

Ths
 
T

T. Valko

Assuming you want:

50
100
150
200

Enter this formula in C1:

=MODE(A1:A6)

Enter this array formula** in C2 and copy down as needed:

=MODE(IF(COUNTIF(C$1:C1,A$1:A$6)=0,A$1:A$6+{0,0}))

No error checking and does not account for empty cells!

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

ONG

If i use Match in as below

100
200
200
200
50
200

Formula= Match(200,a1:a6,false)
Result =2, what formula should i use if i want the all results coming out?
ie {2,3,4,6}
 
T

T. Valko

You can't return the results like: {2,3,4,6}. You'd have to return one
number per cell like this:

2
3
4
6

To do that the formula gets more complicated. Try this array formula**:

Entered in C1 then copied down until you get blanks:

=IF(ROWS(C$1:C1)<=COUNTIF(A$1:A$6,200),SMALL(IF(A$1:A$6=200,ROW(A$1:A$6)),ROWS(C$1:C1))-MIN(ROW(A$1:A$6))+1,"")

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top