Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default How can I get Excel (2003) to return just the first 4 words (of another cell)?

Hi

How can I get Excel (2003) to return just the first 4 words of another
cell?
With thanks


Ship
Shiperton Henethe

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default How can I get Excel (2003) to return just the first 4 words (of another cell)?

On Fri, 07 Sep 2007 03:37:37 -0700, ship wrote:

Hi

How can I get Excel (2003) to return just the first 4 words of another
cell?
With thanks


Ship
Shiperton Henethe


What do you want to do if there are less than four words in the cell?

This should get you started. Substitute what you want for less than four words
for the string in the formula below.

=IF((LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ","")))<4,
"LESS THAN FOUR WORDS",
LEFT(TRIM(A1),FIND(CHAR(1),SUBSTITUTE(TRIM(A1)," ",CHAR(1),4))-1))


--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default How can I get Excel (2003) to return just the first 4 words (of an

Assuming you have no carets (^) in your cell, and assuming the cell with the
string you want to act on is A1, try

=LEFT(A1,FIND("^",SUBSTITUTE(A1," ","^",4))-1)


"ship" wrote:

Hi

How can I get Excel (2003) to return just the first 4 words of another
cell?
With thanks


Ship
Shiperton Henethe


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default How can I get Excel (2003) to return just the first 4 words (of an

try this with your string in A1

=LEFT(A1,FIND(" ",A1,FIND(" ",A1,FIND(" ",A1,FIND(" ",A1,FIND("
",A1,1)+1)+1)+1)))

Mike

"ship" wrote:

Hi

How can I get Excel (2003) to return just the first 4 words of another
cell?
With thanks


Ship
Shiperton Henethe


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
Return the words in every 5th row Terri Excel Discussion (Misc queries) 3 February 22nd 07 07:44 PM
Excel 2003 figures to words PRAKASH Excel Discussion (Misc queries) 1 May 28th 06 12:13 PM
return mulitple values Help!!! Excel 2003 Bob B Excel Discussion (Misc queries) 2 February 14th 06 02:01 PM
HOW DO I DISPLAY NUMBERS AS WORDS IN EXCEL 2003? Silvio Excel Discussion (Misc queries) 3 July 29th 05 08:21 PM
need IF function to return 0 if it finds a one out of three words aledger Excel Worksheet Functions 3 March 1st 05 12:47 AM


All times are GMT +1. The time now is 01: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"