Find based on partial text to another tab to get answer?

sininv

New Member
Joined
Dec 30, 2021
Messages
11
Office Version
  1. 2010
Platform
  1. Windows
Hi


Need help I am trying to find the CL in tab 1 to pull out from the table in Tab 2

eg: Senior Vice President in tab 1 - should auto pick up from Tab 2 as CL4

Can please advise the formula. Thank you




1640847109060.png
 

Attachments

  • 1640846825815.png
    1640846825815.png
    57 KB · Views: 4

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Welcome to the Board!

eg: Senior Vice President in tab 1 - should auto pick up from Tab 2 as CL4
How is that determined?

The thing to understand about Excel is that like other programs, it cannot "think" on its own - it can only behave according to the rules that you tell it.
Excel cannot determine on its own that a "Vice President" would fall under "Director and above". You would need to develop a reference/key for it to refer to in order to determine that.
I would recommend setting up a two column lookup table with all your possible Designations, and what CL level that would fall under, and then use a VLOOKUP formula to look those up for each listing you have.

See: 10 VLOOKUP Examples For Beginner & Advanced Users
 
Upvote 0
Welcome to the Board!


How is that determined?

The thing to understand about Excel is that like other programs, it cannot "think" on its own - it can only behave according to the rules that you tell it.
Excel cannot determine on its own that a "Vice President" would fall under "Director and above". You would need to develop a reference/key for it to refer to in order to determine that.
I would recommend setting up a two column lookup table with all your possible Designations, and what CL level that would fall under, and then use a VLOOKUP formula to look those up for each listing you have.

See: 10 VLOOKUP Examples For Beginner & Advanced Users
Hi Joe4

thank you

how about if the designations column is like that can it use xlookup to fine

any text that find into eg if it's Assistant director (Admin) it will pick up the position under Assistant Director to CL2

1641183759120.png

Do advise if possible and how to?
=XLOOKUP("*"&cellreference&"*",table position, level column,"",2)


Thank you


I try to use
 
Upvote 0
thank you

how about if the designations column is like that can it use xlookup to fine

any text that find into eg if it's Assistant director (Admin) it will pick up the position under Assistant Director to CL2

View attachment 54297
Do advise if possible and how to?
=XLOOKUP("*"&cellreference&"*",table position, level column,"",2)

to find part of the text to match position text within to pick up back the level. not sure if it's can be done under position there are a range within one cell?
Thank you


I try to use
 
Upvote 0
thank you

how about if the designations column is like that can it use xlookup to fine

any text that find into eg if it's Assistant director (Admin) it will pick up the position under Assistant Director to CL2

View attachment 54297
Do advise if possible and how to?
=XLOOKUP("*"&cellreference&"*",table position, level column,"",2)


Thank you


I try to use
I don't think that will work, trying to do partial matches on that. For example, if you are looking for Director, you would find it on 4 different lines in your lookup table (since you are only doing partial matches, and not complete matches).

I would set up the lookup table like this:
1641215601893.png


and use VLOOKUP.
 
Upvote 0
I don't think that will work, trying to do partial matches on that. For example, if you are looking for Director, you would find it on 4 different lines in your lookup table (since you are only doing partial matches, and not complete matches).

I would set up the lookup table like this:
View attachment 54317

and use VLOOKUP.
Thank Joe.
 
Upvote 0
hi

Is there any way to use vlookup to look for approximate match to the text
eg:

title is Senior Associate Director (XXX) in sheet a, how to match first 40 character to pickup from another sheet B with position and level.

As long as there Senior Associate Director match in Sheet B, it will pickup the level ? the three example with Senior Associate Director in the title should pick up as CL2. I have try but cannot pick, it pick the wrong CL.

Sheet a
eg: Title Senior Associate Director (abc)
Senior Associate Director (ZYY)
Senior Associate Director (ppt)

Sheet b
1642507274973.png
 
Upvote 0
If the extra part always start with "(", we can use a formula to cut off that part of the entry for the sake of the match.

For example, if you have "Senior Associate Director (abc)" in cell A2, then:
Rich (BB code):
=VLOOKUP(LEFT(A2,FIND("(",A2)-2),...)
 
Upvote 0
hi Joe,

I not sure how to use the code you provided.
=VLOOKUP(LEFT(A2,FIND("(",A2)-2),...)

can you kindly help. Thank you


I try these method and it didn't give the right answers for most
1) VLOOKUP($E2&"*",worksheetb$A$2:$C$13,2,TRUE) and the answer is not right

2) VLOOKUP(LEFT(B2,FIND("("B2)???
1642582807291.png
 
Upvote 0
The VLOOKUP formula has 4 arguments (parameters):
=VLOOKUP(lookup value, table array, column index number, approximate match)

Just use the formula I provided in the first argument (lookup value) part of the formula, i.e.
Rich (BB code):
=VLOOKUP(LEFT(B2,FIND("(",B2)-2),worksheetb$A$2:$C$13,2,TRUE)
(I am guessing that "worksheetb" is not the real name of your worksheet, so make sure that you adjust that accordingly.

However, in looking at the sample data you provided in your last post, I don't think that this will work for you in all cases, as you do have entries that do NOT have "(".
And you have some entries that don't look like they have any match at all, no matter what you do, i.e.
- Head, HR
- Head, Marketing

There seems to be no consistency in the data, which makes this task very difficult.
It is hard to program when there are no rules to you can follow.
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,731
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top