Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ExcelMonkey
 
Posts: n/a
Default Find max number of character and return cell address

I have a range of cells from E18:E21 that look like this:

?
?
?3?
?3?4?

I want to return the cell address of the cell which has the max numbers of
"?". So its like a lookup on the range E18:E21 with the search argument
looking for the most number of "?". But then I want to return the cell
address E21.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Find max number of character and return cell address


Is that your ultimate aim or are you looking to do something else with
the result?

You could try

=ADDRESS(ROW(E$18)+MATCH(MAX(LEN(E18:E21)-LEN(SUBSTITUTE(E18:E21,"?",""))),LEN(E18:E21)-LEN(SUBSTITUTE(E18:E21,"?","")),0)-1,COLUMN($E18),4)

confirmed with CTRL+SHIFT+ENTER

If there's a tie it returns the first cell


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=533076

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ExcelMonkey
 
Posts: n/a
Default Find max number of character and return cell address

No I am pulling the address into another formula after it is calculated. Why?

Thanks

EM



"daddylonglegs" wrote:


Is that your ultimate aim or are you looking to do something else with
the result?

You could try

=ADDRESS(ROW(E$18)+MATCH(MAX(LEN(E18:E21)-LEN(SUBSTITUTE(E18:E21,"?",""))),LEN(E18:E21)-LEN(SUBSTITUTE(E18:E21,"?","")),0)-1,COLUMN($E18),4)

confirmed with CTRL+SHIFT+ENTER

If there's a tie it returns the first cell


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=533076


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Find max number of character and return cell address


Some functions, INDEX for instance, can return a cell reference or that
cell's contents. The INDEX formula on its own will always return the
contents but used in the right context within another formula it can
return the cell reference.

If you want to use the result of the formula I posted in another
formula you'd have to do that in conjunction with INDIRECT


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=533076

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Find max number of character and return cell address

On Fri, 14 Apr 2006 16:13:02 -0700, ExcelMonkey
wrote:

I have a range of cells from E18:E21 that look like this:

?
?
?3?
?3?4?

I want to return the cell address of the cell which has the max numbers of
"?". So its like a lookup on the range E18:E21 with the search argument
looking for the most number of "?". But then I want to return the cell
address E21.

Thanks


If the range in which these cells that contain "?" is named rng, then the
**array** formula will return the address of the cell with the most ?'s. If
there are multiple cells with the same highest number of question marks, it
will only return the address of the first cell.

To enter an array formula, you must hold down <ctrl<shift while hitting
<enter Excel will place braces {...} around the formula.

Presumes that your array is a single column:

=ADDRESS(MATCH(MAX(LEN(rng)-LEN(SUBSTITUTE(
rng,"?",""))),LEN(rng)-LEN(SUBSTITUTE(rng,"?","")),0)-1
+ROW(rng),COLUMN(rng))


--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John James
 
Posts: n/a
Default Find max number of character and return cell address


A simple way to see how many "?" are in each cell, enter this formula in
F18 & copy down:
=LEN(E18)-LEN(SUBSTITUTE(E18,"?",""))

This will let you sort them and see the duplicates


--
John James
------------------------------------------------------------------------
John James's Profile: http://www.excelforum.com/member.php...o&userid=32690
View this thread: http://www.excelforum.com/showthread...hreadid=533076

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
If it's not a space, return the cell contents. Gee... Excel Worksheet Functions 3 January 3rd 06 11:50 PM
How to remove or replace a carriage return character in a cell? Patty Excel Discussion (Misc queries) 2 July 26th 05 06:25 PM
Finding a character type within a cell shineboxnj Excel Worksheet Functions 1 July 22nd 05 03:12 AM
FIND a character Brian H Excel Discussion (Misc queries) 2 January 27th 05 02:56 PM
identify data in a cell that has a number as the second character Brian Excel Worksheet Functions 1 December 12th 04 03:23 PM


All times are GMT +1. The time now is 12:23 AM.

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"