Hi Tom, have tried to include the counter in the code below, but i
obviously am hopelessly lost !!
Could you please help again, maybe with a bit of explanation if
possible....Thanks in advance.
Sub InsPriceDiff()
Dim rng As Range, cell As Range
Dim myNum As Variant
Dim i As Long
Dim NumRows As Long
Dim LastRow As Long
Set rng = Range(Range("H4"), Range("H4").End(xlDown))
LastRow = Cells(Rows.Count, "D").End(xlUp).Row
NumRows = LastRow - 3
For Each cell In rng
If cell.Offset(0, 4) < cell.Value And Not
IsEmpty(cell.Offset(0, 4)) Then
myNum = cell.Offset(0, 0) - cell.Offset(0, 4)
cell.Offset(0, 3) = myNum
End If
UpdateProgressDiff (cell - 3) / NumRows
Next
Unload UserForm3
FormatColumnsC
End Sub
-----------------------------------------------------------------
Sub UpdateProgressDiff(Pct)
With UserForm3
.FrameProgress.Caption = Format(Pct, "0%")
.LabelProgress.Width = Pct * (.FrameProgress.Width - 10)
.Repaint
End With
End Sub
Les Stout
*** Sent via Developersdex
http://www.developersdex.com ***