Thread: OR
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default OR

One way
Sub ifdue()
If Application.CountIf(Range("a4:b4"), "a") 0 Then
Range("g3") = Application.Sum(Range("a2:f3"))
End If
End Sub
--
Don Guillett
SalesAid Software

"Howard" wrote in message
...
If I want to insert an OR statement in this sub, how would I do it? IF

Range("a4 or b4 or c4 or d4").Text = "Due" then...

Sub Balance()
With Range("g1")
IF Range("c4").Text = "Due" Then
.Cells.Formula = "=sum(a2,f3)"
Else
.Cells.Formula = 0
End If
End With
End Sub

Thanks,
Howard