Hey, apologies if this is a silly question, I’m new…
I have a configuration excel file which is being looked up against to match an email subject with a company name
So EG: if the email says ‘new enquiry’ the sheet will know to put it to ‘client1’ etc.
So I have my variable of pConfig looking up to the variable of pEmailSubject: pConfig(pEmailSubject).ToString
The issue is that the email subject varies, so it will have ‘new enquiry 12345’ and ‘new enquiry 98554’ for example as the customer ID changes. How would I make it so that it essentially says if it ‘contains’ new enquiry to be looked up against?
I hope this makes sense, please ask for clarity if needed. Appreciate your help!
Welcome to the community.
Do you want to see if the subject contains the phrase “new enquiry” ?
The obvious answer is to use the CONTAINS method.
Would this post help you? Check if string contains substring
Thanks Giannis, I think the issue here is that it needs to only get the first three words from the subject rather than the whole subject. Is there a way I could do this?