Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Link from a specific Cell in Excel to a specific para. in Word | Excel Worksheet Functions | |||
Linking a Specific Word to a Specific Number | Excel Worksheet Functions | |||
Linking a Specific Word to a Specific Number | Excel Worksheet Functions | |||
Count Specific word in specific range | Excel Worksheet Functions | |||
Count If Specific word in specific range | Excel Discussion (Misc queries) |