Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I return characters from within brackets?

I have a spreadsheet where column "A" concatenates an product name with
its product number. The product are within brackets, and,
unfortunately, are of varying lengths. Herewith two examples:

PRODUCT 123[R56011]
PRODUCT 45678[5065]

What I need to do is create a column "B" that only has the SKU number.
This will allow me to use the VLOOKUP function to match data in other
columns based on the unique SKU number with data in another sheet.
Specifically, the column "B" data for the two examples above should
look like:

R56011
5065

I can't program on my own, but is there a command or function that will
allow me to instruct excel to take only the characters between those
brackets and put it in the adjacent cell in column B, regardless of the
number of characters between the brackets?

If anyone has advice, it'd be great!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default How do I return characters from within brackets?

Try something like this:

For a value in A1

B1: =MID(A1,SEARCH("[",A1)+1,SEARCH("]",A1)-SEARCH("[",A1)-1)

Example:
A1: PRODUCT 123[R56011]
B1: returns R56011

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Acastus" wrote:

I have a spreadsheet where column "A" concatenates an product name with
its product number. The product are within brackets, and,
unfortunately, are of varying lengths. Herewith two examples:

PRODUCT 123[R56011]
PRODUCT 45678[5065]

What I need to do is create a column "B" that only has the SKU number.
This will allow me to use the VLOOKUP function to match data in other
columns based on the unique SKU number with data in another sheet.
Specifically, the column "B" data for the two examples above should
look like:

R56011
5065

I can't program on my own, but is there a command or function that will
allow me to instruct excel to take only the characters between those
brackets and put it in the adjacent cell in column B, regardless of the
number of characters between the brackets?

If anyone has advice, it'd be great!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default How do I return characters from within brackets?

On 29 Jul 2006 12:07:49 -0700, "Acastus" wrote:

I have a spreadsheet where column "A" concatenates an product name with
its product number. The product are within brackets, and,
unfortunately, are of varying lengths. Herewith two examples:

PRODUCT 123[R56011]
PRODUCT 45678[5065]

What I need to do is create a column "B" that only has the SKU number.
This will allow me to use the VLOOKUP function to match data in other
columns based on the unique SKU number with data in another sheet.
Specifically, the column "B" data for the two examples above should
look like:

R56011
5065

I can't program on my own, but is there a command or function that will
allow me to instruct excel to take only the characters between those
brackets and put it in the adjacent cell in column B, regardless of the
number of characters between the brackets?

If anyone has advice, it'd be great!


If the only brackets are those surrounding the Product Number, then:

=MID(A1,FIND("[",A1)+1,FIND("]",A1)-FIND("[",A1)-1)

should do it.
--ron
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I return characters from within brackets?

Bless you both! Yes, both work fine. Thanks again - it really saved me
a HUGE amount of crap work!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default How do I return characters from within brackets?

On 29 Jul 2006 14:24:33 -0700, "Acastus" wrote:

Bless you both! Yes, both work fine. Thanks again - it really saved me
a HUGE amount of crap work!


You're welcome. Thanks for the feedback.
--ron
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
characters around numbers ellie Excel Discussion (Misc queries) 3 December 28th 05 09:14 PM
How do create a formula to evalute a # to return 1 of 4 conditions Larry Excel Worksheet Functions 4 May 29th 05 12:58 AM
How to return # characters based on 2nd instance of value JDay01 Excel Worksheet Functions 4 May 19th 05 05:29 PM
Using a Vlookup to return values in a data list? rtjeter Excel Worksheet Functions 2 April 26th 05 05:56 AM
if the value of a cell in a range is not blank, then return the v. kvail Excel Worksheet Functions 2 April 8th 05 10:07 PM


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