Inserting Blank Rows Within Subtotalled Data

  • Hi,


    I've got a spreadsheet that I prepare for a group that has patient data subtotalled by physicians. The problem is that the group uses this data for data entry and wants a blank row between each different patient name within the physicians subtotals and I have no clue how to get there. Any chance there might be some VBA code that could accomplish this?


    I appreciate any help on this one.


    Keith

  • Re: Inserting Blank Rows Within Subtotalled Data


    Does this work for you?

    Code
    Sub KC()
        Dim i As Long
        For i = Cells(Rows.Count, 1).End(xlUp).Row To 3 Step -1
            If Cells(i - 1, 1) <> Cells(i, 1) Then
                Rows(i).Insert
            End If
        Next
    End Sub

    [SIZE=1]Entia non sunt multiplicanda sine necessitate.[/SIZE]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!