View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default If then statement in excell?

Hit [Enter] too soon!

Sub TestIfThenElse()
IF Range("X1").Value = 4 Then
'code to perform when condition is true
Else
'code to perform when condition is not true
End If

You can have multiple code statements in both the Then section and the Else
section if you need them.

"BMatson" wrote:

How do I create an If then statement in excell?