• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Exact Match finding issue with Code

uday

Member
Hi,

I am facing issue to find out exact match. Please help. I have attached the code herewith.

strsub is variable and contain the string. and "Cross Charge" is the value which needs to be looked up in strsub string.

The issue is if "Cross Charged" is mentioned in a string Macro is also finding it, which is wrong. I need to find out the exact text message as "Cross Charge".


Regards,
Uday
Code:
     If InStr(1, strsub, "Cross Charge") > 0 Then

    mi.Move subadhoc

      ElseIf InStr(1, strbody, "Cross Charge") > 0 Then

      mi.Move subadhoc

      End If
 
Hi,​
just obviously add another Instr test for "Cross Charged" or test with leading / ending space(s) as well …​
 
Back
Top