View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Erin Erin is offline
external usenet poster
 
Posts: 75
Default Mid and Find in macro

Well actually I meant "number" as in integer -- it could be "1 Dog" instead
of "Alpha Dog", but yes, it could also be "Alpha Dog Beta", in which case I
would want "Dog Beta". I just want to get rid of the first word or numbers
and spaces.

"Rick Rothstein" wrote:

Your question is not entirely clear to me... are you looking for the 2nd
word in a text string or the last? For example, what did you want to see for
"Alpha Dog Beta"? The reason for my confusion is your use of 255 in the MID
function call (after finding the first space) coupled with your statement
that the number of words can vary.

--
Rick (MVP - Excel)


"Erin" wrote in message
...
Hi!

I'm trying to use this type of formula in a macro, but I can't figure out
the syntax:

Trim(MID(A1,FIND(" ",A1),255))

So if I have "Alpha Dog" in a cell, I want to only show "Dog". The length
of each word or number will vary and there could be multiple spaces
between
them.

Appreciate any help!