Answer by assylias for "And" and "Or" troubles within an IF statement
This is not an answer, but too long for a comment. In reply to JP's answers / comments, I have run the following test to compare the performance of the 2 methods. The Profiler object is a custom class...
View ArticleAnswer by JimmyPena for "And" and "Or" troubles within an IF statement
I like assylias' answer, however I would refactor it as follows:Sub test()Dim origNum As StringDim creditOrDebit As StringorigNum = "30062600006"creditOrDebit = "D"If creditOrDebit = "D" Then If...
View ArticleAnswer by assylias for "And" and "Or" troubles within an IF statement
The problem is probably somewhere else. Try this code for example:Sub test() origNum = "006260006" creditOrDebit = "D" If (origNum = "006260006" Or origNum = "30062600006") And creditOrDebit = "D" Then...
View Article"And" and "Or" troubles within an IF statement
I'm trying to use "And"& "Or" within an If statement. I probably have my syntax wrong.the result comes back false when the data should make it true. Here is the code:ElseIf (origNum = "006260006"...
View Article