ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   choose a cell in a range which has a text (there is only one) (https://www.excelbanter.com/excel-discussion-misc-queries/219406-choose-cell-range-has-text-there-only-one.html)

flying man

choose a cell in a range which has a text (there is only one)
 
Resulting from other calculations, I have a group of cells in which one
contains a text and all the others are zero (or " ").
I need to make a given cell to assume the text of the non-zero cell on that
group.

If I had number insted of text, the function "Max" would work, but it does
not with text content.

Mike H

choose a cell in a range which has a text (there is only one)
 
Hi,

What is a 'group' of cells? This works with a single column or row

=INDEX(A1:A11,MATCH(MAX(LEN(A1:A11)),LEN(A1:A11),0 ),1)

This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike



"flying man" wrote:

Resulting from other calculations, I have a group of cells in which one
contains a text and all the others are zero (or " ").
I need to make a given cell to assume the text of the non-zero cell on that
group.

If I had number insted of text, the function "Max" would work, but it does
not with text content.


Pete_UK

choose a cell in a range which has a text (there is only one)
 
If the cells which do not contain the text value actually had "" (not
" " nor zero) from their respective formulae, then you could just do
this:

=A1 & A2 & A3 & A4 & A5 & A6 ... and so on.

Hope this helps.

Pete

On Feb 6, 12:41*pm, flying man
wrote:
Resulting from other calculations, I have a group of cells in which one
contains a text and all the others are zero (or " *").
I need to make a given cell to assume the text of the non-zero cell on that
group.

If I had number insted of text, the function "Max" would work, but it does
not with text content.




All times are GMT +1. The time now is 10:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com