Bracket

  • Thread starter Thread starter Ranjit kurian
  • Start date Start date
R

Ranjit kurian

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
 
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
 
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)
 
=MID(A1,2,FIND(")",A1)-2)

Ranjit kurian said:
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top