Two conditions in IF statement

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
 
J

JE McGimpsey

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
 
Top