A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
@ OssieMac
HAT OFF!!!!!!! to you mate, what amazing work you have done,
I wanted to join you earlier but I really couldn't follow the thread until your last post with the link to the 2 files.
Allow me a humble suggestion since you will continue providing your assistance to ExcelFunTension
Rather than:
- .copy/paste,
- format the tables,
- finding the last row multiple times with the loop creating the files
Try having an Output Template file where you will only
- paste the data as a value
- and then save with the already planned format
The file in the link below contains the following
- Sheet tabs distributed as in the picture below
- I choose to separate the "Categories" sheet into their four categories (I respect the OP's choice to not do it like that, but considering the early stage of the project this approach might be good to be considered)
This approach will save you time and coding.
a) No need to find the last row
b) You'll always paste in the same range
c) Tables were converted into real Excel Tables, allowing as you mentioned in the code, to use the Tables ListObjects properties in lieu of Column/last row numbers or variables.
With a piece of code like
With wbOutput.Worksheets("Category_1").ListObjects("Category1Tb").DataBodyRange(1, 1)
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End With
d) You might don't need the cell formatting code part. Since tables dynamically adapt/adjust their formating after pasting the filtered data
e) Columns O, P, and Q in the Output sheet will always have the same values
Location="New York"
Date= current date
Status= "C"
You might don't need to have it in the code, the template can handle it (but it is up to you guys)
f) Similar method for the "Coversheet" tab but, using Named ranges.
Description =Coversheet!$B$4
Document_number =Coversheet!$B$1
Document_owner =Coversheet!$B$12
Evaluation_date =Coversheet!$B$5
ME =Coversheet!$B$15
Project =Coversheet!$B$13
RE =Coversheet!$B$14
Record_vr =Coversheet!$B$7
Revision =Coversheet!$B$2
Unique_number =Coversheet!$B$3
The file in the link is the New_Output_Template
Do let me know how further I can help you
Best Regards
Jeovany