How to return proper names if mentioned in an open comment box

danducati

New Member
Joined
Aug 29, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I am trying to return proper names that are included in open comment boxes so these people can be recognized.

Formula Sought: If the comment box includes a proper name that matches a name in the named range called kudos, then I want that name to be returned in the "CS Rep Recognized" column. If there is no match, the cell would show as blank.

Current Formula, which is close but not exact: =IFERROR(INDEX(kudos,MATCH(TRUE,ISNUMBER(SEARCH(kudos,M6909)),0)),"")

I have gotten very close as you will see below with the "Alex" example. But it's not the perfect formula as you can see in the "Lea" example, which is pulling Lea back because of the word "clear" in the comment box. I would be so grateful if someone could help me get over the finish line with this. Thank you!!!!!!!!!!

Named Range "kudos"
1661807812704.png
1661807753564.png
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try...

Excel Formula:
=IFERROR(INDEX(kudos,MATCH(TRUE,ISNUMBER(SEARCH(" "&kudos&" "," "&M6909&" ")),0)),"")

Although the formula would need to be amended if a sentence in Column M ends with a name and then is immediately followed by a period.

Hope this helps!
 
Upvote 0
Solution
Try...

Excel Formula:
=IFERROR(INDEX(kudos,MATCH(TRUE,ISNUMBER(SEARCH(" "&kudos&" "," "&M6909&" ")),0)),"")

Although the formula would need to be amended if a sentence in Column M ends with a name and then is immediately followed by a period.

Hope this helps!
Dude, YOU.ARE.THE.MAN!!!!!!!!!!!!!!! Thank you!!

It gets me 99% of the way there which is as good as it's going to get because "will not..." returns an employee's name Will & there is no way around that. I'll just spot check those names that could go either way & delete the formula in that cell if necessary.

I can't thank you enough, Domenic. You are AMAZING!!!
 
Upvote 0
. . . "will not..." returns an employee's name Will & there is no way around that
How about if you made the search case-sensitive by replacing SEARCH with FIND?
 
Upvote 0

Forum statistics

Threads
1,214,848
Messages
6,121,917
Members
449,055
Latest member
KB13

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