Hello everybody,
I have the following if conditions which I have to convert into OR statements in a simple way. That is, if either one of this condition is true then the variable count should be updated (count =count +1)
<!-- BEGIN TEMPLATE: bbcode_code -->
Thanks,
Vijay
I have the following if conditions which I have to convert into OR statements in a simple way. That is, if either one of this condition is true then the variable count should be updated (count =count +1)
<!-- BEGIN TEMPLATE: bbcode_code -->
Code:
lastrow = Sheets(2).UsedRange.Rows.count
For icell = 2 To lastrow
If (Sheets(2).Range("B" & icell).Value <> Sheets(2).Range("B" & (icell - 1)).Value) Then
If (Sheets(2).Range("P" & icell).Value <> Sheets(2).Range("P" & (icell - 1)).Value) Then
If (Sheets(2).Range("R" & icell).Value <> Sheets(2).Range("R" & (icell - 1)).Value) Then
if (Sheets(2).Range("T" & icell).Value <> Sheets(2).Range("T" & (icell - 1)).Value) Then
If (Sheets(2).Range("U" & icell).Value <> Sheets(2).Range("U" & (icell - 1)).Value) Then
If (Sheets(2).Range("V" & icell).Value <> Sheets(2).Range("V" & (icell - 1)).Value) Then
count = count +1
Next icell
Thanks,
Vijay