Compare strings with substrings in excel

aspire

New Member
Joined
May 30, 2017
Messages
2
Hi,

I have certain mail subjects which are part static part dynamic for e.g. Job ABC_DEF_GHJ:12345 Here the subject preceding the : is fixed, while the one after is dynamic.


In a day I will have 100's of such mail subjects, some of them will have common fixed parts, only the dynamic vary, But the actions on these mails with the same fixed part is common.



Mail subjectSubstringAction
ABC_DEF_GHJ:12345ABC_DEF_GHJReply
ABC_DEF_GHJ:12346ABC_DEF_GHJReply
ABC_DEF_GHJ:12347ABC_DEF_GHJReply
ABC_DEF_GHJ:12348ABC_DEF_GHJReply
ABC_DEF_GHJ:12349ABC_DEF_GHJReply
RST_UVW_XYZ:45678RST_UVW_XYZForward
RST_UVW_XYZ:45679RST_UVW_XYZForward
RST_UVW_XYZ:45680RST_UVW_XYZForward
RST_UVW_XYZ:45681RST_UVW_XYZForward

<colgroup><col><col><col></colgroup><tbody>
</tbody>


So in essence if I create an Excel database containing Substring and action I will have something like below

Substring Action
ABC_DEF_GHJ Reply
RST_UVW_XYZ Forward

Now assuming I have all the mail subjects with me in an excel, how can I compare it against the Excel database that I created above to get the action against it.

Please suggest.

Best Regards
Shailesh


<tbody>
</tbody>
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Also please note that there could be variable part before the fixed part as well say like below

Mail subjectSubstringAction
Urgent ABC_DEF_GHJ:12345ABC_DEF_GHJReply
Low ABC_DEF_GHJ:12346ABC_DEF_GHJReply
Priority ABC_DEF_GHJ:12347ABC_DEF_GHJReply
Urgent ABC_DEF_GHJ:12348ABC_DEF_GHJReply
Low ABC_DEF_GHJ:12349ABC_DEF_GHJReply
Priority RST_UVW_XYZ:45678RST_UVW_XYZForward
RST_UVW_XYZ:45679RST_UVW_XYZForward
RST_UVW_XYZ:45680RST_UVW_XYZForward
RST_UVW_XYZ:45681RST_UVW_XYZForward

<tbody>
</tbody>
 
Upvote 0
So you already created a separate table like above? The Substring, and Action columns are already in separate columns?

For your question, you said:

"assuming I have all the mail subjects with me in an excel"

Do you have the first column "Mail Subject" only? And that's all?

And you want to separate the Subject and Action from the entire string?

Maybe post what you have, and what you expect to result. It seems like you're asking for something that is simple to achieve. I'm just not sure exactly what you're trying to do.
 
Upvote 0

Forum statistics

Threads
1,215,352
Messages
6,124,455
Members
449,161
Latest member
NHOJ

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