Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Extract Text with Left, Mid, etc

I have 2 spreadsheets that need to talk to each other. One is a product line
plan, the other is a margin model. I need to compare product names on the two
and show any differences on the margin model. The problem is, some of the
products have extra text in the form of size in the margin model, but not in
the line plan. This is necessary because costs will be different for
different sizes. All the names have 3 words, the third being the size.

Margin Model Name will be:
Product One XS
Product One Small
Product One Medium
Product Three XS
Product Three Small
Product Three Medium

Line plan name will be Product One, Product Two, Product Three, etc.

Assuming margin model name in column A, this is the formula I came up with
just to get the text:

=LEFT(A5,FIND(" ",A5)-1)&MID(A5,FIND(" ",A5),6)

This will return Product One, and even Product Two, but not Product Three,
instead yielding Product Thre.

Since the second word is of variable length and the size text is variable,
how do I eliminate the size word and just get the two Product name words?
Once I have that, I can do an IF statement with a VLOOKUP to compare the two
names and return any discrepancies.

Any help greatly appreciated!
Bernie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Extract Text with Left, Mid, etc

Try
=LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1))

If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:

I have 2 spreadsheets that need to talk to each other. One is a product line
plan, the other is a margin model. I need to compare product names on the two
and show any differences on the margin model. The problem is, some of the
products have extra text in the form of size in the margin model, but not in
the line plan. This is necessary because costs will be different for
different sizes. All the names have 3 words, the third being the size.

Margin Model Name will be:
Product One XS
Product One Small
Product One Medium
Product Three XS
Product Three Small
Product Three Medium

Line plan name will be Product One, Product Two, Product Three, etc.

Assuming margin model name in column A, this is the formula I came up with
just to get the text:

=LEFT(A5,FIND(" ",A5)-1)&MID(A5,FIND(" ",A5),6)

This will return Product One, and even Product Two, but not Product Three,
instead yielding Product Thre.

Since the second word is of variable length and the size text is variable,
how do I eliminate the size word and just get the two Product name words?
Once I have that, I can do an IF statement with a VLOOKUP to compare the two
names and return any discrepancies.

Any help greatly appreciated!
Bernie

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Extract Text with Left, Mid, etc

Is it really that simple? That works perfectly! Thank you very much, Jacob.

"Jacob Skaria" wrote:

Try
=LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1))

If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:

I have 2 spreadsheets that need to talk to each other. One is a product line
plan, the other is a margin model. I need to compare product names on the two
and show any differences on the margin model. The problem is, some of the
products have extra text in the form of size in the margin model, but not in
the line plan. This is necessary because costs will be different for
different sizes. All the names have 3 words, the third being the size.

Margin Model Name will be:
Product One XS
Product One Small
Product One Medium
Product Three XS
Product Three Small
Product Three Medium

Line plan name will be Product One, Product Two, Product Three, etc.

Assuming margin model name in column A, this is the formula I came up with
just to get the text:

=LEFT(A5,FIND(" ",A5)-1)&MID(A5,FIND(" ",A5),6)

This will return Product One, and even Product Two, but not Product Three,
instead yielding Product Thre.

Since the second word is of variable length and the size text is variable,
how do I eliminate the size word and just get the two Product name words?
Once I have that, I can do an IF statement with a VLOOKUP to compare the two
names and return any discrepancies.

Any help greatly appreciated!
Bernie

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Extract Text with Left, Mid, etc

Oops, I spoke too soon. Your formula puts a space at the end of the text.
That defeats the possiblity of a VLOOKUP. Sorry.

"Jacob Skaria" wrote:

Try
=LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1))

If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:

I have 2 spreadsheets that need to talk to each other. One is a product line
plan, the other is a margin model. I need to compare product names on the two
and show any differences on the margin model. The problem is, some of the
products have extra text in the form of size in the margin model, but not in
the line plan. This is necessary because costs will be different for
different sizes. All the names have 3 words, the third being the size.

Margin Model Name will be:
Product One XS
Product One Small
Product One Medium
Product Three XS
Product Three Small
Product Three Medium

Line plan name will be Product One, Product Two, Product Three, etc.

Assuming margin model name in column A, this is the formula I came up with
just to get the text:

=LEFT(A5,FIND(" ",A5)-1)&MID(A5,FIND(" ",A5),6)

This will return Product One, and even Product Two, but not Product Three,
instead yielding Product Thre.

Since the second word is of variable length and the size text is variable,
how do I eliminate the size word and just get the two Product name words?
Once I have that, I can do an IF statement with a VLOOKUP to compare the two
names and return any discrepancies.

Any help greatly appreciated!
Bernie

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Extract Text with Left, Mid, etc



=TRIM(LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1)))


berniean wrote:
Oops, I spoke too soon. Your formula puts a space at the end of the text.
That defeats the possiblity of a VLOOKUP. Sorry.

"Jacob Skaria" wrote:

Try
=LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1))

If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:

I have 2 spreadsheets that need to talk to each other. One is a product line
plan, the other is a margin model. I need to compare product names on the two
and show any differences on the margin model. The problem is, some of the
products have extra text in the form of size in the margin model, but not in
the line plan. This is necessary because costs will be different for
different sizes. All the names have 3 words, the third being the size.

Margin Model Name will be:
Product One XS
Product One Small
Product One Medium
Product Three XS
Product Three Small
Product Three Medium

Line plan name will be Product One, Product Two, Product Three, etc.

Assuming margin model name in column A, this is the formula I came up with
just to get the text:

=LEFT(A5,FIND(" ",A5)-1)&MID(A5,FIND(" ",A5),6)

This will return Product One, and even Product Two, but not Product Three,
instead yielding Product Thre.

Since the second word is of variable length and the size text is variable,
how do I eliminate the size word and just get the two Product name words?
Once I have that, I can do an IF statement with a VLOOKUP to compare the two
names and return any discrepancies.

Any help greatly appreciated!
Bernie



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Extract Text with Left, Mid, etc

Try the below

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

If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:

Oops, I spoke too soon. Your formula puts a space at the end of the text.
That defeats the possiblity of a VLOOKUP. Sorry.

"Jacob Skaria" wrote:

Try
=LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1))

If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:

I have 2 spreadsheets that need to talk to each other. One is a product line
plan, the other is a margin model. I need to compare product names on the two
and show any differences on the margin model. The problem is, some of the
products have extra text in the form of size in the margin model, but not in
the line plan. This is necessary because costs will be different for
different sizes. All the names have 3 words, the third being the size.

Margin Model Name will be:
Product One XS
Product One Small
Product One Medium
Product Three XS
Product Three Small
Product Three Medium

Line plan name will be Product One, Product Two, Product Three, etc.

Assuming margin model name in column A, this is the formula I came up with
just to get the text:

=LEFT(A5,FIND(" ",A5)-1)&MID(A5,FIND(" ",A5),6)

This will return Product One, and even Product Two, but not Product Three,
instead yielding Product Thre.

Since the second word is of variable length and the size text is variable,
how do I eliminate the size word and just get the two Product name words?
Once I have that, I can do an IF statement with a VLOOKUP to compare the two
names and return any discrepancies.

Any help greatly appreciated!
Bernie

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Extract Text with Left, Mid, etc

Yes, that works. As does Glenn's Trim function.

"Jacob Skaria" wrote:

Try the below

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

If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:

Oops, I spoke too soon. Your formula puts a space at the end of the text.
That defeats the possiblity of a VLOOKUP. Sorry.

"Jacob Skaria" wrote:

Try
=LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1))

If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:

I have 2 spreadsheets that need to talk to each other. One is a product line
plan, the other is a margin model. I need to compare product names on the two
and show any differences on the margin model. The problem is, some of the
products have extra text in the form of size in the margin model, but not in
the line plan. This is necessary because costs will be different for
different sizes. All the names have 3 words, the third being the size.

Margin Model Name will be:
Product One XS
Product One Small
Product One Medium
Product Three XS
Product Three Small
Product Three Medium

Line plan name will be Product One, Product Two, Product Three, etc.

Assuming margin model name in column A, this is the formula I came up with
just to get the text:

=LEFT(A5,FIND(" ",A5)-1)&MID(A5,FIND(" ",A5),6)

This will return Product One, and even Product Two, but not Product Three,
instead yielding Product Thre.

Since the second word is of variable length and the size text is variable,
how do I eliminate the size word and just get the two Product name words?
Once I have that, I can do an IF statement with a VLOOKUP to compare the two
names and return any discrepancies.

Any help greatly appreciated!
Bernie

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Extract Text with Left, Mid, etc

Yes, that works, as does Jacob's -1)

"Glenn" wrote:



=TRIM(LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1)))


berniean wrote:
Oops, I spoke too soon. Your formula puts a space at the end of the text.
That defeats the possiblity of a VLOOKUP. Sorry.

"Jacob Skaria" wrote:

Try
=LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1))

If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:

I have 2 spreadsheets that need to talk to each other. One is a product line
plan, the other is a margin model. I need to compare product names on the two
and show any differences on the margin model. The problem is, some of the
products have extra text in the form of size in the margin model, but not in
the line plan. This is necessary because costs will be different for
different sizes. All the names have 3 words, the third being the size.

Margin Model Name will be:
Product One XS
Product One Small
Product One Medium
Product Three XS
Product Three Small
Product Three Medium

Line plan name will be Product One, Product Two, Product Three, etc.

Assuming margin model name in column A, this is the formula I came up with
just to get the text:

=LEFT(A5,FIND(" ",A5)-1)&MID(A5,FIND(" ",A5),6)

This will return Product One, and even Product Two, but not Product Three,
instead yielding Product Thre.

Since the second word is of variable length and the size text is variable,
how do I eliminate the size word and just get the two Product name words?
Once I have that, I can do an IF statement with a VLOOKUP to compare the two
names and return any discrepancies.

Any help greatly appreciated!
Bernie


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Extract Text with Left, Mid, etc

Try using

=MID(A9,1,FIND(" ",A9,FIND(" ",A9)+1))
Anand
09910548139

On Oct 2, 12:11*pm, berniean
wrote:
Yes, that works. As does Glenn's Trim function.

"Jacob Skaria" wrote:
Try the below


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


If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:


Oops, I spoke too soon. Your formula puts a space at the end of the text.
That defeats the possiblity of a VLOOKUP. Sorry.


"Jacob Skaria" wrote:


Try
=LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1))


If this post helps click Yes
---------------
Jacob Skaria


"berniean" wrote:


I have 2 spreadsheets that need to talk to each other. One is a product line
plan, the other is a margin model. I need to compare product names on the two
and show any differences on the margin model. The problem is, some of the
products have extra text in the form of size in the margin model, but not in
the line plan. This is necessary because costs will be different for
different sizes. All the names have 3 words, the third being the size.


Margin Model Name will be: *
Product One XS
Product One Small
Product One Medium
Product Three XS
Product Three Small
Product Three Medium


Line plan name will be Product One, Product Two, Product Three, etc.


Assuming margin model name in column A, this is the formula I came up with
just to get the text:


=LEFT(A5,FIND(" ",A5)-1)&MID(A5,FIND(" ",A5),6)


This will return Product One, and even Product Two, but not Product Three,
instead yielding Product Thre.


Since the second word is of variable length and the size text is variable,
how do I eliminate the size word and just get the two Product name words?
Once I have that, I can do an IF statement with a VLOOKUP to compare the two
names and return any discrepancies.


Any help greatly appreciated!
Bernie


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
How to extract left-most number from a string Jason[_11_] Excel Worksheet Functions 16 October 9th 08 11:10 PM
to extract numeric figures in left side od the alpha charectors pl pol Excel Discussion (Misc queries) 1 August 20th 08 08:29 AM
Easiest way to extract characters in a cell LEFT or RIGHT of a sym Training Goddess Excel Worksheet Functions 2 May 29th 07 09:05 PM
Find text within cell then display text to left Jambruins Excel Discussion (Misc queries) 5 April 17th 06 10:01 PM
HOW DO I EXTRACT ALL CHARACTERS AFTER 5 CHARACTERS ON LEFT GRYSYF Excel Worksheet Functions 5 October 12th 05 10:58 AM


All times are GMT +1. The time now is 03:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"