#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Bracket

i need a macro code to identify the words which are mentioned inside the
bracket.
The macro should create a variable for the words inside the bracket then
compare the variable which are in bracket and pull out the items related to
that particular.

example:

Question:
sheet one contain the below details
(TNT)Titan co
(ANPS)Assocation
(SSTS)Socity

Sheet two contain the below details
coln1. coln2.
(TNT) TT
(ANPS) AA
(SSTS) SS


Answer: my macro should do a kind of vlookup b/w sheetone and sheettwo and
it should through the answer as shown below


TT
AA
SS
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Bracket

You can use a "Helper" column on sheet one. Enter the formula

=LEFT(A1,FIND(")",A1))

and drag down the column. Use the helper column in your VLookup.

Regards,
Charlie

"Ranjit kurian" wrote:

i need a macro code to identify the words which are mentioned inside the
bracket.
The macro should create a variable for the words inside the bracket then
compare the variable which are in bracket and pull out the items related to
that particular.

example:

Question:
sheet one contain the below details
(TNT)Titan co
(ANPS)Assocation
(SSTS)Socity

Sheet two contain the below details
coln1. coln2.
(TNT) TT
(ANPS) AA
(SSTS) SS


Answer: my macro should do a kind of vlookup b/w sheetone and sheettwo and
it should through the answer as shown below


TT
AA
SS

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Bracket

hi Charlie

Thanks for the code it really helped me.

is there any way to remove the brackets example:

Question : (TNT)
Answer : TNT (remove the bracket, then give only the text)


"Charlie" wrote:

You can use a "Helper" column on sheet one. Enter the formula

=LEFT(A1,FIND(")",A1))

and drag down the column. Use the helper column in your VLookup.

Regards,
Charlie

"Ranjit kurian" wrote:

i need a macro code to identify the words which are mentioned inside the
bracket.
The macro should create a variable for the words inside the bracket then
compare the variable which are in bracket and pull out the items related to
that particular.

example:

Question:
sheet one contain the below details
(TNT)Titan co
(ANPS)Assocation
(SSTS)Socity

Sheet two contain the below details
coln1. coln2.
(TNT) TT
(ANPS) AA
(SSTS) SS


Answer: my macro should do a kind of vlookup b/w sheetone and sheettwo and
it should through the answer as shown below


TT
AA
SS

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Bracket

=MID(A1,2,FIND(")",A1)-2)

"Ranjit kurian" wrote:

hi Charlie

Thanks for the code it really helped me.

is there any way to remove the brackets example:

Question : (TNT)
Answer : TNT (remove the bracket, then give only the text)


"Charlie" wrote:

You can use a "Helper" column on sheet one. Enter the formula

=LEFT(A1,FIND(")",A1))

and drag down the column. Use the helper column in your VLookup.

Regards,
Charlie

"Ranjit kurian" wrote:

i need a macro code to identify the words which are mentioned inside the
bracket.
The macro should create a variable for the words inside the bracket then
compare the variable which are in bracket and pull out the items related to
that particular.

example:

Question:
sheet one contain the below details
(TNT)Titan co
(ANPS)Assocation
(SSTS)Socity

Sheet two contain the below details
coln1. coln2.
(TNT) TT
(ANPS) AA
(SSTS) SS


Answer: my macro should do a kind of vlookup b/w sheetone and sheettwo and
it should through the answer as shown below


TT
AA
SS

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
Bracket {..} in formulas milet New Users to Excel 3 October 1st 09 05:01 PM
basketball bracket tonyalt3 Excel Worksheet Functions 5 March 16th 09 10:01 PM
Need Help with Bracket system steve_ojapan Excel Discussion (Misc queries) 0 February 1st 08 10:38 PM
Bracket Sheet OdAwG Excel Programming 1 October 29th 06 12:42 PM
World Cup bracket help upper90 Excel Discussion (Misc queries) 4 June 2nd 06 09:47 PM


All times are GMT +1. The time now is 01:57 AM.

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"