Return text based on differing size "prefixes" found in ajacent text

user69

New Member
Joined
Mar 14, 2019
Messages
1
Hi,

Hope you might be able to help with this one. The formula I need to come up with is for Column E.

Column A and B give a list of all prefixes and their corresponding work type. This could be considered a 'legend' for the formula to lookup from.

Column D is freehand manually typed text, where each line represents a call taken by call centre staff. If the call is classifiable into a type from column B, they put the corresponding prefix before their description of the call (i.e. from column A). If the call type is not any type in column B, they ignore the prefix when typing a description.

Each cell in Column E needs to look at the adjacent cell in Column D and determine if any prefixes from Column A are used.

If yes, return the text description (i.e. What the prefix stands for).
If no, return "Other".

The formula needs to find a perfect match in the initial text from Column D. If any text is accidently used before the prefix, or the prefix is misspelled, return "Other".

Hope I've explained it well enough. The tricky part for me is picking up different sized prefixes (which may have spaces). Screenshot below:


u2E1Fcz.jpg
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You could avoid typo error
- insert a column for the prefix where user selects from a dropdown
- the formula that you need then becomes a simple VLLOOKUP
 
Last edited:
Upvote 0
Is that will be ok for you?

PrefixPrefix Call TypeUser textUser textCall Type
HB PHamburger pickupHB P for harryBCIOP at closing timeBoss checking in on performance
HB DHamburger deliverySWEPS D for footy teamHB D :)Hamburger delivery
P DPie deliveryesjdenrd hdhrdhHB P for harryHamburger pickup
PACDPie and chips deliveryC D no namePACPPie and chips pickup
PACPPie and chips pickupTM call centre (ignored!!)PACPChips pickup
CDChips deliveryC D for sara and johnPC 1 blocked the number...Prank call
CPChips pickupSWEPS D for ballet teamSWEPS D for ballet teamSundae with extra pink sprinkles delivery
SWEPS DSundae with extra pink sprinkles deliverySPAM SPAM SPAMSWEPS D for footy teamSundae with extra pink sprinkles delivery
PCPrank callHB D :)TM call centre (ignored!!)Telemarketer
TMTelemarketer1$$$%32523123123
BCIOPBoss checking in on performancePC 1 blocked the number...
BCIOP at closing time
blah blah blah :)
PACP
&&&&&&&&
PAC_D

it will eliminate text which doesn't contain any prefix in user text (in short: no Other)
 
Upvote 0
green table should be like this:

User textCall Type
BCIOP at closing timeBoss checking in on performance
HB D :)Hamburger delivery
HB P for harryHamburger pickup
PACPPie and chips pickup
PC 1 blocked the number...Prank call
SWEPS D for ballet teamSundae with extra pink sprinkles delivery
SWEPS D for footy teamSundae with extra pink sprinkles delivery
TM call centre (ignored!!)Telemarketer

but giving the user the option to enter what he wants is a bad idea, so I think the Yongle option is a better solution
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,803
Members
449,048
Latest member
greyangel23

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