Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 81
Default Function to show the greatest number of characters

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Function to show the greatest number of characters

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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default Function to show the greatest number of characters

Try the following array formula:

=IF(COUNTA($A$1:$F$1)=0,"No
Data",OFFSET($A$1,0,MATCH(MAX(COUNTIF($A$1:$F$1,A1 :F1)),COUNTIF($A$1:$F$1,A1:F1),0)-1))

Since this is an array formula, you must press CTRL SHIFT ENTER rather than
just ENTER when you first enter the formula and whenever you edit it later.
If you do this properly, Excel will display the formula in the formula bar
enclosed in curly braces { }. See www.cpearson.com/Excel/ArrayFormulas.aspx
for more information about array formulas.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)




"juliejg1" wrote in message
...
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.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Function to show the greatest number of characters

On Tue, 11 Dec 2007 14:12:09 -0800, juliejg1
wrote:

Perfect! Thank you!


You're welcome.
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I show only the cell in a row with the greatest value? Steph Excel Discussion (Misc queries) 3 September 17th 07 02:39 PM
pick the greatest number out of a group for the total box chunky Excel Worksheet Functions 1 August 22nd 06 02:23 AM
Force function to show positive or negative number? smoore Excel Worksheet Functions 3 March 3rd 06 08:34 PM
Show alternate or different characters Greg Hill Excel Discussion (Misc queries) 2 April 21st 05 05:39 PM
#VALUE in cell but pop up function box show right number Ted Dalton Excel Discussion (Misc queries) 1 December 14th 04 03:15 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"