ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Mode Function combined with a filter (https://www.excelbanter.com/excel-worksheet-functions/251383-mode-function-combined-filter.html)

Neolyth

Mode Function combined with a filter
 
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


Gary''s Student

Mode Function combined with a filter
 
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.
--
Gary''s Student - gsnu200909


"Neolyth" wrote:

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



All times are GMT +1. The time now is 03:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com