Please see the attached document regarding formatting issues. Everything is explained in the document.
Thanks for the help, almost done writing this large macro that will be so useful for me!
Please see the attached document regarding formatting issues. Everything is explained in the document.
Thanks for the help, almost done writing this large macro that will be so useful for me!
[vba]
Sub ProcessData()
Dim lastrow As Long
Dim endat As Long
Dim i As Long
With ActiveSheet
lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = lastrow To 5 Step -1
endat = i
Do While .Cells(i - 1, "C").Value = .Cells(i, "C").Value And i - 1 >= 5
i = i - 1
Loop
.Rows(endat + 1).Insert
.Cells(endat + 1, "A") = "Total Quantity:"
.Cells(endat + 1, "H").FormulaR1C1 = "=SUM(R[-1]C:R" & i & "C)"
.Rows(i).Resize(2).Insert
.Cells(i + 1, "A").Value = "Block Trade:"
Next i
End With
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
That works great, thank you so much!