View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Matthew Herbert Matthew Herbert is offline
external usenet poster
 
Posts: 56
Default taking a word out

On Aug 18, 10:42*am, Matthew Herbert wrote:
On Aug 18, 10:28*am, childofthe1980s

wrote:
Hello:


I have a column that contains an inventory item number followed by a space
and then the word "Average".


How do I take out the space and "Average", so that I can just have the
inventory item number?


There is no set number of characters for the inventory item number.


childofthe1980s


childofthe1980s,

If your cell has one space in it then you can use some of the string
functions available in Excel.

A1:189604 Average
B1: =LEFT(A1,LEN(A1)-FIND(" ",A1)-1)

Best,

Matthew Herbert


childofthe1980s,

Sorry, I made a typo. The formula should be the following:

B1: =LEFT(A1,FIND(" ",A1)-1)

Best,

Matt