Consulting

Results 1 to 3 of 3

Thread: Solved: Formatting issues

  1. #1
    VBAX Mentor
    Joined
    Aug 2011
    Posts
    353
    Location

    Solved: Formatting issues

    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!
    Attached Files Attached Files

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [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

  3. #3
    VBAX Mentor
    Joined
    Aug 2011
    Posts
    353
    Location
    That works great, thank you so much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •