Mode Function combined with a filter

N

Neolyth

Hi
I'd like to use the mode-function like sumifs or countifs. So first I want
to do a filtering and then use the resulting list to calculate the modal
value. How can I do this?

Thanks in advance
 
G

Gary''s Student

Say we have data in column A, from A1 thru A19:

data
1
1
1
1
2
2
2
3
3
4
5
6
7
8
9
10
11
12

Where A1 is the header cell. Use:

=MODE(IF(SUBTOTAL(3,OFFSET(A2:A19,ROW(A2:A19)-ROW(A2),,1))=1,A2:A19,""))

This is an array function that must be entered with CNTRL-SHFT-ENTER rather
than just the ENTER key.
 

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