See if something like this will work out...
Mark
'**************************************************************
Dim row As Long
Dim col As Long
For row = 16 To 20 ' rows 16 to 20
For col = 3 To 11 ' columns C to K
If Cells(row, col).Value > 0 And _
Cells(row, col).Offset(17).Value = vbNullString Then
' Do something here
End If
Next
Next
' Take out the for loop involving the row if you do not need it
' and define "row" to equal whatever you need like this:
' row = 10
' before the for loop
"Sandy" <(E-Mail Removed)> wrote in message
news:CBF01954-F28B-4E29-8F2E-(E-Mail Removed)...
> Is it possible to combine the following :-
>
> For Each MyCell In Sheets("Current Round Detailed").Range("C10:K10")
> If (MyCell.Value > 0 And MyCell.Offset(12).Value = vbNullString) Or
> _
> (MyCell.Value > 1 And MyCell.Offset(14).Value = vbNullString)
> Then
>
> MsgBox "xxxxxxxxx"
>
> Exit Sub
> End If
> Next MyCell
>
> For Each MyCell In Sheets("Current Round Detailed").Range("C16:K16")
> If (MyCell.Value > 0 And MyCell.Offset(17).Value = vbNullString) Or
> _
> (MyCell.Value > 1 And MyCell.Offset(19).Value = vbNullString)
> Then
>
> MsgBox "yyyyyyyyyyy"
>
> Exit Sub
> End If
> Next MyCell
>
> into something along the lines of :-
>
> If
> For Each MyCell In Sheets("Current Round Detailed").Range("C10:K10")
> If (MyCell.Value > 0 And MyCell.Offset(12).Value = vbNullString) Or
> _
> (MyCell.Value > 1 And MyCell.Offset(14).Value = vbNullString)
> End If
> Next MyCell
>
> Or
>
> For Each MyCell In Sheets("Current Round Detailed").Range("C16:K16")
> If (MyCell.Value > 0 And MyCell.Offset(17).Value = vbNullString) Or
> _
> (MyCell.Value > 1 And MyCell.Offset(19).Value = vbNullString)
> End If
> Next MyCell
> Then "zzzzzzzzzzzzzzzz"
>
> Thanks in advance
> Sandy
|