Same Results - which is better?
Oops. Didn't look the other way. Again, just an idea.
Sub Demo()
Dim txt_ethy_flags
txt_ethy_flags = "B" 'Pick a letter for testing
Select Case txt_ethy_flags
Case "B", "D", "E", "J", "U"
Cells(134 + (492844 Mod (Asc(txt_ethy_flags) - 55)), 4) =
txt_ethy_flags
Case Else
'Your remaining code...
End Select
End Sub
--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =
"Dana DeLouis" wrote in message
...
I found that your "Case" statements a little easier to follow.
Would combining a few lines help?
Sub Demo()
Const N As Double = 20801155080#
Dim t As Double
Dim txt_ethy_flags
txt_ethy_flags = "U" 'Pick a letter for testing
Select Case txt_ethy_flags
Case "B", "D", "E", "J", "U"
t = Asc(txt_ethy_flags) + 77
Worksheets("con1").Cells(N - t * Int(N / t), 4) = txt_ethy_flags
Case Else
'Your remaining code...
End Select
End Sub
--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =
Case "B"
Worksheets("con1").Cells(134, 4).Value = txt_ethy_flags
Case "D"
Worksheets("con1").Cells(135, 4).Value = txt_ethy_flags
Case "E"
Worksheets("con1").Cells(136, 4).Value = txt_ethy_flags
Case "J"
Worksheets("con1").Cells(137, 4).Value = txt_ethy_flags
Case "U"
Worksheets("con1").Cells(138, 4).Value = txt_ethy_flags
|