I am having an additional problem with this. I got the macro to work for the most part but when it is added to the second sheet I am having trouble getting it to format as a table correctly. I have a few column headings set up in the second sheet before I add the new data. Then I grab the data from the first sheet and paste it to the right of the new columns. That is fine. My new question is: can I have excel automatically format all the data as a table (with colors and so I can sort by each column if necessary)? I can get it to work with a set number of cells that I can just record into the macro but since the number of entries copied over changes each time I need a way to only format the cells where there is data.
The code generated from the macro that I used to create a table style for the defined cells is:
A1 is always my starting point and Q is always the ending column but the row for Q changes. Can I change the 7 into a variable that represents the total number of rows?
Bookmarks