View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Doug Doug is offline
external usenet poster
 
Posts: 460
Default The mode function

These are vlookup data. There are multiple fields with the same name. Is it
possible that it won't work with a vlookup?

I tried all the example that were given to me and it always says "true"

I am about to give up on this one....
Any more ideas?

Consumer Staples
Finance
Utilities
Oils-Energy
Utilities
Computer and Technology
Computer and Technology
Consumer Staples
Consumer Staples

--
Thank you!


"Dave Peterson" wrote:

Maybe:
If the data set contains no duplicate data points, MODE returns the #N/A error
value.
(from xl2003's help)

Maybe you can try to get it working on a smaller range and see the conditions
where it breaks.

Doug wrote:

Can't figure out why it still returns a #N/A for the answer.
The N/A's are hidden because they are filtered out of the table, but the
mode function keeps saying they are there...
Any more suggestions?
--
Thank you!

"Dave Peterson" wrote:

=INDEX(S3:S1000,MODE(MATCH(IF(ISNA(S3:S1000),"",S3 :S1000),
IF(ISNA(S3:S1000),"",S3:S1000),0)))



Doug wrote:

I can't figure out how to put the ISNA in this formula to avoid getting a
#N/A value
This works accept when there is an #N/A in the range.
=INDEX(S3:S1000,MODE(MATCH(S3:S1000,S3:S1000,0)))
--
Thank you!

"Dave Peterson" wrote:

This array formula:

=INDEX(A1:A20&"",MODE(MATCH(A1:A20&"",A1:A20&"",0) ))

will work if there are empty cells in A1:A20, too.

Doug wrote:

I looked up the capability of the mode function and it said that the only
time it should return an #N/A value is when there are not two names, or
numbers in a range. I am not sure why but for the given stock market sectors,
the function below always returns a #N/A when it should return in this case
the name finance. Any suggestions?

ComputerandTechnology
BasicMaterials
Retail-Wholesale
Medical
Finance
Finance
IndustrialProducts
Utilities
Medical
Finance
=MODE(S832:S841)

--
Thank you!

--

Dave Peterson
.


--

Dave Peterson
.


--

Dave Peterson
.