View Single Post
  #19   Report Post  
Posted to microsoft.public.excel.worksheet.functions
confused!! confused!! is offline
external usenet poster
 
Posts: 20
Default formula for separating parts of cells

thanks for explaining. The formula is exactly what i needed.

"Glenn" wrote:

For relatively short text strings...

=TRIM(MID(SUBSTITUTE(E5," ",REPT(" ",999)),999*4-998,999*2))

In the formula above, the "4" is first word you want, the "2" is the number of
words you want. So this would return "PGMR *Keep".


confused!! wrote:
that worked wonderfully.

One more time how do I extract the first and second word only?

"Ron Rosenfeld" wrote:

On Wed, 9 Sep 2009 05:42:22 -0700, confused!!
wrote:

currently in cell E5 = MACPAC VER 10 PGMR *Keep Profile* Clarksville

how do i extract the last word in this cell?
Try this:

=TRIM(RIGHT(SUBSTITUTE(E5," ",REPT(" ",99)),99))

--ron