• Erase the lines in a pivot table

    Author
    Topic
    #458982

    Hi,
    I swear I’ve been able to do this before, but now I’m having issues. I don’t want my pivot table to look like a pivot table, so I don’t want any lines. I make sure I “select the entire pivottable” option, then click on the border icon that has no lines. It clears out all the line formatting, but then I refresh the pivot table, and some of the lines (the shape looks like a “t”) come back. How can I get rid of the line formatting for good?
    Thanks!
    Lana

    Viewing 0 reply threads
    Author
    Replies
    • #1155955

      You can use the PivotTableUpdate event of the worksheet. Right-click the sheet tab and copy/paste the following code.

      Code:
      Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
        With Target.TableRange2
      	.Borders(xlEdgeTop).LineStyle = xlLineStyleNone
      	.Borders(xlEdgeRight).LineStyle = xlLineStyleNone
      	.Borders(xlEdgeBottom).LineStyle = xlLineStyleNone
      	.Borders(xlEdgeLeft).LineStyle = xlLineStyleNone
      	.Borders(xlInsideHorizontal).LineStyle = xlLineStyleNone
      	.Borders(xlInsideVertical).LineStyle = xlLineStyleNone
        End With
      End Sub
    Viewing 0 reply threads
    Reply To: Erase the lines in a pivot table

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: