Link to home
Start Free TrialLog in
Avatar of ekaplan323
ekaplan323Flag for United States of America

asked on

Excel Table Formatting new rows

I have created a table from some data.  There may have been other data and formats used on the workbook.  I have added to the table as well as structured references.  When adding rows, the structured references come up fine, however, some of the cell formatting for the cell does not follow the previous row. (Like number format).  I have tried clearing all formatting and deleting rows except for the first row and still the same issue.
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Can you attach your workbook?
Avatar of ekaplan323

ASKER

When I add a row I just select the row, right-click, and choose 'Insert'. When I do that the fields seem to be OK. If that's the way you do it then please give me the details of the problem like what cells are formatted wrong. If you don't use Insert, how do you add a line?
When you tab through the line to create a new row, or even more importantly when you copy and paste just values from another area into the table.  Lots of times there is data from another source that can be just pasted to add to the table.
When you paste, use Paste Special|Values.
User generated imageScreenshot-1-18-15--7-55-AM.jpg
I did that when I pasted.
Sorry to ask you to do this again, but could you possibly create a workbook with two tables that are the same except that the second contains extra pasted data, with the data that was copied and pasted being from some cells someplace in the sheet.
I pasted the data from Sheet 1 to the second table below the first.  I copied the first table to the second table below.  As you see, the formatting did not happen.
Table-Cell-Format-Issue.xlsm
Try this. Go to the Visual Basic environment, insert a module, add this macro to the module and assign a shortcut key (I used "t") to it. If you need help with any of that please let me know.

Then copy whatever rows you want, select a destination cell and type ctrl+t.

Sub CopyTableRows()

    Selection.PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone _
        , SkipBlanks:=False, Transpose:=False
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of ekaplan323
ekaplan323
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Table formatting of cells  are supposed to continue as you add rows.  This solution worked for me.