This has my head spinning as it works in some cases and not in others. I am using the "instr" function to a word I am looking for. When found the result is greater than "0". Here are two examples of what is and is not working. "Taxes - Property" is in one cell and it finds it and "Payroll Taxes" is in another and does not find it. The same for the second example.
Example 1
"Taxes - Property" (without quotes) (finds)![]()
If InStr(1, " " & UCase(ActiveCell.Value) & " ", UCase(" Taxes ")) > 0 Then
"Payroll Taxes" (without quotes) (does not find)
Example 2
"Depreciation Expense" (without quotes) (finds)![]()
If InStr(1, " " & UCase(ActiveCell.Value) & " ", UCase(" Depreciation ")) > 0 Then
"Depreciation Expense (Depreciation on equipment, buildings and improvements)" (without quotes)(does not find)
Is there another parameter I have set incorrectly?
Bookmarks