View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
juliejg1 juliejg1 is offline
external usenet poster
 
Posts: 81
Default Function to show the greatest number of characters

Perfect! Thank you!

"Ron Rosenfeld" wrote:

On Tue, 11 Dec 2007 12:45:00 -0800, juliejg1
wrote:

I have the following in cells:
A1 = blank
B1 = C
C1 = D
D1 = C
E1 = blank
F1 = C

I need a formula in G1 that will show what character (or blank) is the most
common in the range A1:F1. In the case above G1 should show 'C'. If there
are more blank cells in the range then G1 should be blank.



Array-Entered (i.e. enter with <ctrl<shift<enter. Excel should place braces
{...} around the formula):

=IF(COUNTBLANK(A1:F1)MAX(COUNTIF(A1:F1,A1:F1)),"" ,
INDEX(A1:F1,MATCH(MAX(COUNTIF(A1:F1,A1:F1)),COUNTI F(A1:F1,A1:F1),0)))


--ron