Mode function - return default value rather than #N/A error if no

  • Thread starter Struggling in Sheffield
  • Start date
S

Struggling in Sheffield

Hi,
I'm using the following expression to return the mode of a list of numbers:

=IF(H1028="","",MODE(H1028:H1031))

If the four checked cells all have values but there's no two values the same
(i.e. no mode) what I need is an expression that will return me a default
value of 2 rather than the #N/A error value.

Thanks for looking,
Steve.
 
S

Stefi

=IF(ISERROR(MODE(A1028:A31)),2,MODE(A1028:A31))

Regards,
Stefi

„Struggling in Sheffield†ezt írta:
 
S

Stefi

You are welcome! Thanks for the feedback!
Stefi

„Struggling in Sheffield†ezt írta:
 

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