View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Splitting cell contents

You need to use the find, left, right, length and mid formulas.

The formulas will be a little bit ugly. Here is one of the tougher one...

if (Find("Buy", "A1")0, mid("A1", Find("Buy", "A1") + 3, Find("at", "A1"),
mid("A1", Find("Sell", "A1") + 4, Find("at", "A1"))

Parsing text is a little tricky and takes some playing around but this
should give you a start.

"Jon Atkins" wrote:

Hi

Could anyone offer any help on how to split the following into
seperate columns....
All data is in column A, and is formatted as: -

Baked Beans Buy Zeinz Products Today at 10:03:42am
Baked Beans Sell Maru Industries Today at 10:27:32am
Parsnips Buy The Farming Corp. Today at 11:23:57am
Parsnips Sell The Superstore Confed. Today at 12:05:09pm

I would like the text split into columns as: -

Column B Col C Col D Col E Col F ColG
Baked Beans Buy Zeinz Products Today at 10:03:42am
Baked Beans Sell Maru Products Today at 10:27:32am
etc

The text needs to be split around the common words of 'buy', 'sell',
'at' and 'today'. These words will always appear in the original
format.


Thanks for any help