Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default return maximum text "value"

Is there a function to get in a cell the maximum text "value" of a list
(e.g. T1, T2a, T2b).
Like MAX for numbers, part of this functionality is embedded in the
sort/filter commando's.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default return maximum text "value"

Depending on the list structu

With
A1:A30 containing text values (no duplicates, some blanks are OK)

This formula returns the "max" text value:
B1:
=INDEX(A1:A30,MATCH(COUNTA(A1:A30)-1,INDEX(COUNTIF(A1:A30,"<"&A1:A30),0),0))

Eample:
A1: Bravo
A2: (blank)
A3: Zulu
A4: Charlie

The formula returns: Zulu

BUT...if there may be duplicates

Either this ARRAY FORMULA
(committed with Ctrl+Shift+Enter, instead of Enter)
B1: =INDEX(A1:A30,MATCH(MAX(COUNTIF(A1:A30,"<"&A1:A30) ),
COUNTIF(A1:A30,"<"&A1:A30),0))

or...this longer...but, non-array formula:
B1:
=INDEX(A1:A30,MATCH(MAX(INDEX(COUNTIF(A1:A30,"<"&A 1:A30),0)),
INDEX(COUNTIF(A1:A30,"<"&A1:A30),0),0))

OR...if there may be ALL blanks:
Wrap any of those formulas within this structu
B1: =IF(COUNTA(A1:A30),the_formula,"No items listed")
....Committing with Enter or Ctrl+Shift+Enter, depending on the formula you
use.

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"Marcel" wrote in message
...
Is there a function to get in a cell the maximum text "value" of a list
(e.g. T1, T2a, T2b).
Like MAX for numbers, part of this functionality is embedded in the
sort/filter commando's.




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
function to return day in the form "Monday", "Tuesday" etc given . MTro Excel Worksheet Functions 2 October 3rd 07 09:49 AM
Check if cells contain the word "Thailand", return "TRUE" ali Excel Worksheet Functions 7 September 14th 07 09:53 AM
If (A1 = "ValueA" & C1 = "ValueB") return the quantity of matches DaveC Excel Discussion (Misc queries) 2 July 1st 07 10:34 AM
Disabling "wrap text" neuters alt-return line feeds within cell [email protected] Excel Discussion (Misc queries) 2 August 21st 06 04:49 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 08:03 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"