Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default i need help creating a function that will extract words from a string of text

i have a very long column in Excel that has the following type of
information in each cell:

Bosch|Dish|Dishwasher|Bosch Dishwasher

I'm trying to use FIND, LEFT, LEN, RIGHT, and IF to extract the word
"Dish" from the string of text.

I have a ton of these cells and they're all different, but I only need
the word left of the first "|" mark and right of the second "|" mark.

here are a few more examples of the text in each cell

Bosch|Cooking|Oven|Double|Bosch Double Convection Oven - I only want
"Cooking"

LG|Dish|Dishwasher|LG Built-In Dishwasher - I only want "Dish"

Electrolux|Fabric Care|Washer|electrolux washing machine - I only want
"Fabric Care"

Could anyone help me?

Brady

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default i need help creating a function that will extract words from a string of text

Assuming the data is in A1, exact same thing except using FIND:

=MID(A1,FIND("|",A1,1)+1,FIND("|",A1,FIND("|",A1,1 )+1)-
FIND("|",A1,1)-1)

Since case doesn't matter, you can use either one. I'm not sure which
is more efficient - if either, it wouldn't be noticeable.


On Jul 17, 5:13 pm, wrote:
i have a very long column in Excel that has the following type of
information in each cell:

Bosch|Dish|Dishwasher|Bosch Dishwasher

I'm trying to use FIND, LEFT, LEN, RIGHT, and IF to extract the word
"Dish" from the string of text.

I have a ton of these cells and they're all different, but I only need
the word left of the first "|" mark and right of the second "|" mark.

here are a few more examples of the text in each cell

Bosch|Cooking|Oven|Double|Bosch Double Convection Oven - I only want
"Cooking"

LG|Dish|Dishwasher|LG Built-In Dishwasher - I only want "Dish"

Electrolux|Fabric Care|Washer|electrolux washing machine - I only want
"Fabric Care"

Could anyone help me?

Brady



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default i need help creating a function that will extract words from a string of text

wrote...
....
I have a ton of these cells and they're all different, but I only
need the word left of the first "|" mark and right of the second
"|" mark.

....

Looks like you mean between the 1st and 2nd |s. Try

=REPLACE(LEFT(A1,FIND("|",A1,FIND("|",A1)+1)-1),1,FIND("|",A1),"")

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default i need help creating a function that will extract words from a string of text

Harlan Grove wrote...
....
=REPLACE(LEFT(A1,FIND("|",A1,FIND("|",A1)+1)-1),1,FIND("|",A1),"")


Or shorter but with hardcoded #s,

=MID(LEFT(A1,FIND("|",A1,FIND("|",A1)+1)-1),FIND("|",A1)+1,1024)


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
Extract text from a string ellebelle Excel Worksheet Functions 4 June 13th 07 04:25 PM
How do I extract part of a text string Brennan Excel Discussion (Misc queries) 2 November 28th 06 07:26 PM
Extract text string using MID Turk Excel Worksheet Functions 5 October 11th 06 06:39 PM
Extract text from String Dan Excel Worksheet Functions 8 July 1st 06 12:39 PM
Extract % from text string Mike Excel Worksheet Functions 5 December 1st 04 08:02 PM


All times are GMT +1. The time now is 02:50 PM.

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"