OR

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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" The
.Cells.Formula = "=sum(a2,f3)
Els
.Cells.Formula =
End I
End Wit
End Su

Thanks
Howard
 
You can use this Howard

If Application.WorksheetFunction.CountIf _
(Range("A4:D4"), "Due") > 0 Then

Or

If Range("A4").Text = "Due" Or _
Range("B4").Text = "Due" Or _
Range("C4").Text = "Due" Or _
Range("D4").Text = "Due" Then
 
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
(e-mail address removed)
Howard said:
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...
 
Back
Top