I'm trying to make this work but I get a Type Mismatch error. Any
clues?
If strFrequency = "ea pay" Or "each pay" Or "Bi Weekly" Or "Bi-Weekly"
Or "BI WEEKLY" Or "BI-WEEKLY" Or "bi weekly" Or "bi-weekly" Or "EA
PAY" Or "EACH PAY" Or "Ea Pay" Or "Each Pay" Then
Range("D11") = lAmount * 2
Else
Range("D11") = lAmount
End If
2 things
1.) you have to tell excel what you compare everytime
2.) you can use LCase to change the case of all the
Letters in strFrequency to lower case, so you won't
have any problems with case sensitivity.
If LCase(strFrequency) = "ea pay" Or _
LCase(strFrequency) = "each pay" Or _
LCase(strFrequency) = "bi weekly" Or _
LCase(strFrequency) = "bi-weekly" Then
Range("D11") = lAmount * 2
Else
Range("D11") = lAmount
End If
I put the _ after the lines in order to avoid word wrap.
If you want it one whole line, just delete the _ and put
it back together.
hth
Carlo
On Nov 27, 1:00 pm, bramniz...@gmail.com wrote:
> I'm trying to make this work but I get a Type Mismatch error. Any
> clues?
[quoted text clipped - 6 lines]
> Range("D11") = lAmount
> End If