ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Taking the mode based on Cell value (https://www.excelbanter.com/excel-discussion-misc-queries/27898-taking-mode-based-cell-value.html)

sip8316

Taking the mode based on Cell value
 
I am trying to take the Mode of a column, which I now how to do, but if the
Mode=0 I want to only take the mode of the non zero values. Is there a way
to do this...I have this so far and it takes the mode fine :

=IF(MODE(A1:A100)<0,MODE(A1:A200))

Any Help would be great.

Domenic

Try...

=MODE(IF(A1:A100<0,A1:A100))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"sip8316" wrote:

I am trying to take the Mode of a column, which I now how to do, but if the
Mode=0 I want to only take the mode of the non zero values. Is there a way
to do this...I have this so far and it takes the mode fine :

=IF(MODE(A1:A100)<0,MODE(A1:A200))

Any Help would be great.


Peo Sjoblom

Yes, try


=MODE(IF(A1:A100<0,A1:A100))

enter the formula with ctrl + shift & enter

--
Regards,

Peo Sjoblom


"sip8316" wrote in message
...
I am trying to take the Mode of a column, which I now how to do, but if the
Mode=0 I want to only take the mode of the non zero values. Is there a
way
to do this...I have this so far and it takes the mode fine :

=IF(MODE(A1:A100)<0,MODE(A1:A200))

Any Help would be great.



Bob Phillips

=MODE(IF(A1:A100<0,A1:A100))

which is an array formula, so commit with Ctrl-Shift-Enter

--

HTH

RP
(remove nothere from the email address if mailing direct)


"sip8316" wrote in message
...
I am trying to take the Mode of a column, which I now how to do, but if

the
Mode=0 I want to only take the mode of the non zero values. Is there a

way
to do this...I have this so far and it takes the mode fine :

=IF(MODE(A1:A100)<0,MODE(A1:A200))

Any Help would be great.




sip8316

Thanks, that did it great.

Scott

"Domenic" wrote:

Try...

=MODE(IF(A1:A100<0,A1:A100))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"sip8316" wrote:

I am trying to take the Mode of a column, which I now how to do, but if the
Mode=0 I want to only take the mode of the non zero values. Is there a way
to do this...I have this so far and it takes the mode fine :

=IF(MODE(A1:A100)<0,MODE(A1:A200))

Any Help would be great.




All times are GMT +1. The time now is 08:46 PM.

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