Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default If/Then by specific word

Is there a way to do an IF statement where if a specific word is in a
multiple word description, I could put that word in a different column. I
have hundreds of item descriptions for a nut category and would like to
create a TYPE column for the different types of nuts.

For example, if the descriptions was PL PEANUT NUT SNACK, then the word
PEANUT would go in the type column in that row. Or if PL ALMOND NUT SNACK
was the description, then ALMOND would go in that column.

Was thinking of an If/Then statement, but don't know how to tell it to look
for that specifice word in the cell.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default If/Then by specific word

If they are ALL formatted as your example i.e. start with "PL " then try:

=IF(ISNUMBER(SEARCH(" nut ",A1)),TRIM(MID(A1,3,SEARCH(" nut ",A1)-3)),"")

"Supe" wrote:

Is there a way to do an IF statement where if a specific word is in a
multiple word description, I could put that word in a different column. I
have hundreds of item descriptions for a nut category and would like to
create a TYPE column for the different types of nuts.

For example, if the descriptions was PL PEANUT NUT SNACK, then the word
PEANUT would go in the type column in that row. Or if PL ALMOND NUT SNACK
was the description, then ALMOND would go in that column.

Was thinking of an If/Then statement, but don't know how to tell it to look
for that specifice word in the cell.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default If/Then by specific word

Unfortunately they are not. The first word is usually the vendor name so
there are going to be several different beginnings.



"Toppers" wrote:

If they are ALL formatted as your example i.e. start with "PL " then try:

=IF(ISNUMBER(SEARCH(" nut ",A1)),TRIM(MID(A1,3,SEARCH(" nut ",A1)-3)),"")

"Supe" wrote:

Is there a way to do an IF statement where if a specific word is in a
multiple word description, I could put that word in a different column. I
have hundreds of item descriptions for a nut category and would like to
create a TYPE column for the different types of nuts.

For example, if the descriptions was PL PEANUT NUT SNACK, then the word
PEANUT would go in the type column in that row. Or if PL ALMOND NUT SNACK
was the description, then ALMOND would go in that column.

Was thinking of an If/Then statement, but don't know how to tell it to look
for that specifice word in the cell.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default If/Then by specific word

So what is a general format?

"vendor-text type-of-nut NUT moretext" ?

Does type-of-nut always precede the word NUT?

"Supe" wrote:

Unfortunately they are not. The first word is usually the vendor name so
there are going to be several different beginnings.



"Toppers" wrote:

If they are ALL formatted as your example i.e. start with "PL " then try:

=IF(ISNUMBER(SEARCH(" nut ",A1)),TRIM(MID(A1,3,SEARCH(" nut ",A1)-3)),"")

"Supe" wrote:

Is there a way to do an IF statement where if a specific word is in a
multiple word description, I could put that word in a different column. I
have hundreds of item descriptions for a nut category and would like to
create a TYPE column for the different types of nuts.

For example, if the descriptions was PL PEANUT NUT SNACK, then the word
PEANUT would go in the type column in that row. Or if PL ALMOND NUT SNACK
was the description, then ALMOND would go in that column.

Was thinking of an If/Then statement, but don't know how to tell it to look
for that specifice word in the cell.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default If/Then by specific word

try:

=IF(ISNUMBER(SEARCH(" nut ",A1)),TRIM(MID(A1,FIND(" ",A1),SEARCH(" nut
",A1)-SEARCH(" ",A1))))

"Toppers" wrote:

So what is a general format?

"vendor-text type-of-nut NUT moretext" ?

Does type-of-nut always precede the word NUT?

"Supe" wrote:

Unfortunately they are not. The first word is usually the vendor name so
there are going to be several different beginnings.



"Toppers" wrote:

If they are ALL formatted as your example i.e. start with "PL " then try:

=IF(ISNUMBER(SEARCH(" nut ",A1)),TRIM(MID(A1,3,SEARCH(" nut ",A1)-3)),"")

"Supe" wrote:

Is there a way to do an IF statement where if a specific word is in a
multiple word description, I could put that word in a different column. I
have hundreds of item descriptions for a nut category and would like to
create a TYPE column for the different types of nuts.

For example, if the descriptions was PL PEANUT NUT SNACK, then the word
PEANUT would go in the type column in that row. Or if PL ALMOND NUT SNACK
was the description, then ALMOND would go in that column.

Was thinking of an If/Then statement, but don't know how to tell it to look
for that specifice word in the cell.

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
Link from a specific Cell in Excel to a specific para. in Word CathyK Excel Worksheet Functions 0 August 10th 06 04:40 PM
Linking a Specific Word to a Specific Number [email protected] Excel Worksheet Functions 1 July 11th 06 05:55 PM
Linking a Specific Word to a Specific Number [email protected] Excel Worksheet Functions 2 July 11th 06 05:50 PM
Count Specific word in specific range [email protected] Excel Worksheet Functions 2 May 16th 06 10:30 AM
Count If Specific word in specific range [email protected] Excel Discussion (Misc queries) 2 May 16th 06 10:14 AM


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