Hopefully a simple one. I'm trying to work out what criteria stops this bit of code.
My understanding ov VBA is pretty basic.....
So,
In the MSP Data worksheet, from cell C4 - it's looking for 0 data then moving to another cell.
Basically - what's it doing in terms of moving and why is it stopping (as i'd expect it to go to the end of the column, which it isn't)
Thanks for any help
david
Sheets("MSP Data").Activate
Range("C4").Select
While Not ActiveCell.Offset(0, 0) = ""
If (ActiveCell.Offset(0, 1) = 0) Then
If (Not (ActiveCell.Offset(0, 1) > ActiveCell.Offset(-1, 1))) Then
ActiveCell.Offset(0, 2) = ActiveCell.Offset(-1, 2)
ActiveCell.Offset(0, 3) = ActiveCell.Offset(-1, 3)
ActiveCell.Offset(0, 4) = ActiveCell.Offset(-1, 4)
ActiveCell.Offset(0, 5) = ActiveCell.Offset(-1, 5)
ActiveCell.Offset(0, 6) = ActiveCell.Offset(-1, 6)
ActiveCell.Offset(0, 13) = ActiveCell.Offset(-1, 13)
ActiveCell.Offset(0, -1) = ActiveCell.Offset(-1, -1)
ActiveCell.Offset(0, 0) = ActiveCell.Offset(-1, 0)
End If
End If
ActiveCell.Offset(1, 0).Select
Wend
End Sub
My understanding ov VBA is pretty basic.....
So,
In the MSP Data worksheet, from cell C4 - it's looking for 0 data then moving to another cell.
Basically - what's it doing in terms of moving and why is it stopping (as i'd expect it to go to the end of the column, which it isn't)
Thanks for any help
david
Sheets("MSP Data").Activate
Range("C4").Select
While Not ActiveCell.Offset(0, 0) = ""
If (ActiveCell.Offset(0, 1) = 0) Then
If (Not (ActiveCell.Offset(0, 1) > ActiveCell.Offset(-1, 1))) Then
ActiveCell.Offset(0, 2) = ActiveCell.Offset(-1, 2)
ActiveCell.Offset(0, 3) = ActiveCell.Offset(-1, 3)
ActiveCell.Offset(0, 4) = ActiveCell.Offset(-1, 4)
ActiveCell.Offset(0, 5) = ActiveCell.Offset(-1, 5)
ActiveCell.Offset(0, 6) = ActiveCell.Offset(-1, 6)
ActiveCell.Offset(0, 13) = ActiveCell.Offset(-1, 13)
ActiveCell.Offset(0, -1) = ActiveCell.Offset(-1, -1)
ActiveCell.Offset(0, 0) = ActiveCell.Offset(-1, 0)
End If
End If
ActiveCell.Offset(1, 0).Select
Wend
End Sub