C
cd
i'm not 100% familiar with the Select Case option -
similar to If Then - however, based on the number of Tiers
you have, I'm thinking Select Case might work best.
instead of cycling through a bunch of If statements or IIf
statements, it would only find the correct Case that
matches.
Select Case Tier
Case 1
Dollar>44999 And Dollar <100000 Then Tier = 1
Case 2
Dollar>99999 And Dollar <200000 Then Tier = 2
etc
End Case
again, i am not familiar with the correct Select Case
method, so my code above will not work, but it gives you
an idea how it works. it just finds the correct dollar
range and applies the corresponding Tier. perhaps someone
more familiar with Select Case can provide you with more
precise coding. it is my understanding Select Case in
this type of situation is more efficient- it finds the
correct individual case instead of processing 14 If Then
or IIf statements - thereby speeding up the database.
similar to If Then - however, based on the number of Tiers
you have, I'm thinking Select Case might work best.
instead of cycling through a bunch of If statements or IIf
statements, it would only find the correct Case that
matches.
Select Case Tier
Case 1
Dollar>44999 And Dollar <100000 Then Tier = 1
Case 2
Dollar>99999 And Dollar <200000 Then Tier = 2
etc
End Case
again, i am not familiar with the correct Select Case
method, so my code above will not work, but it gives you
an idea how it works. it just finds the correct dollar
range and applies the corresponding Tier. perhaps someone
more familiar with Select Case can provide you with more
precise coding. it is my understanding Select Case in
this type of situation is more efficient- it finds the
correct individual case instead of processing 14 If Then
or IIf statements - thereby speeding up the database.