Two conditions in IF statement

  • Thread starter Thread starter tushargarg729
  • Start date Start date
T

tushargarg729

Hello,

I am trying to write a macro which uses If statements subject to two
logic checks.

Example

Sub test()
IF(A3>=B3 & A3<=C3) Then
Range("B7").Select
Selection.Copy
....
End IF
End Sub

Any help on this is much appreciated. Thanks
 
One way:

Public Sub Test()
If Range("A3").Value >= Range("B3").Value And _
Range("A3").Value <= Range("C3").Value Then
Range("B7").Copy
'...
End If
End Sub
 
Hi

Sub aaa()
If Range("A3").Value >= Range("B3").Value And Range("A3").Value <=
Range("C3").Value Then
Range("B7").Copy
End If
End Sub


Doug

(e-mail address removed) wrote in message
 
Back
Top