View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default limit characters returned a cell reference

You could use another cell to hold that value. And then use that cell in the
larger formula.

I use that technique when I build longer formulas.

Then if I used a helper cell (say A2) in my formula, I'll steal the formula for
A2 in the formula bar (don't include the = sign and maybe add ()'s around it).

Then select the cell with my "real" formula.

Everywhere I see A2, I'll replace with my copied formula.

I think John Walkenbach describes the same approach when building what he calls
Monster Formulas (in a couple of his books).

Lila wrote:

Oh wait... I answered my own question. I just placed an actual soft return
in quotes in the Search function. It looks a bit odd, but it works!

=LEFT($E5,(SEARCH("
",E5)))

Now I just have to figure out if there is a way to nest it in an "index" and
"match" formula.

"Lila" wrote in message
...
I have a column that has several lines of text in it. Each row of text has

a
soft return (Alt-Enter) to force certain text to go to the next line.

Now I want to do a cell reference that only shows the text on the first

row.
I found the "Right", "Left" and "Mid" function, but those seem to only be
able to limit by the number of characters and the number of characters in
the first row of text varies greatly from cell to cell.

I thought I could combine the "Search" or "Find" function to look for the
soft return, return the position of the return and place it in the "Left"
function, but I can not figure out how to search for the soft return.

Any suggestions?

--
Lila



--

Dave Peterson