How do I test for the first character

  • Thread starter Thread starter Kevlar
  • Start date Start date
K

Kevlar

OK, now I need to make this a little more complex. Instead of jus
comparing against One value: *Range("D18").Value = 1 * I would like t
use Range("D18").Value = 1 or 2 or 3.

Is that possible? How Would that be written?

If Target.Address = "$D$22" Then
If Range("D18").Value = 1 Then
If Mid((Range("D22")), 1, 1) = "A" Then
Checktool.Show
End If
End If
End I
 
If it will only be an integer value then:

If range("D18") >=1 and range("D18")<=3 then

or if it can be any value and you want specifically 1, 2 or 3

If range("D18") = 1 or _
range("D18") = 2 or _
range("D18") = 3 then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top