AB_wannabe
New Member
- Joined
- Mar 17, 2014
- Messages
- 5
I've been searching for a code to copy a range within a table based on the name of the header for the column in the table.
The table of data is found in Sheet1 range (C5:R16). The table has headers in row 5 (headers of Months of the year) and the data below the headers.
So for example, I need a macro to copy only the data for November (instead of copying the whole table) and then paste it into a different existing workbook. Below is an example of the table.
<COLGROUP><COL style="WIDTH: 48pt" span=3 width=64><COL style="WIDTH: 52pt; mso-width-source: userset; mso-width-alt: 2523" width=69><COL style="WIDTH: 48pt" span=2 width=64><TBODY>
</TBODY>
The table of data is found in Sheet1 range (C5:R16). The table has headers in row 5 (headers of Months of the year) and the data below the headers.
So for example, I need a macro to copy only the data for November (instead of copying the whole table) and then paste it into a different existing workbook. Below is an example of the table.
C5 | July | August | September | October | November |
C6 | 434,181 | 432,875 | 453,043 | 468,311 | 460,025 |
C7 | 17 | 1 | 7 | 35 | 2 |
C8 | 142 | 22 | 1 | 33 | - |
C9 | 32,819 | 31,115 | 29,647 | 29,996 | 27,242 |
C10 | 452 | 273 | 372 | 453 | 321 |
C11 | 64 | 20 | 28 | 24 | 9 |
C12 | 450 | 422 | 874 | 567 | 112 |
C13 | 4,183 | 2,803 | 2,700 | 3,338 | 3,517 |
C14 | 472,308 | 467,531 | 486,672 | 502,757 | 491,228 |
C15 | 1.09% | 0.75% | 0.82% | 0.87% | 0.81% |
C16 | 98.91% | 99.25% | 99.18% | 99.13% | 99.19% |
<COLGROUP><COL style="WIDTH: 48pt" span=3 width=64><COL style="WIDTH: 52pt; mso-width-source: userset; mso-width-alt: 2523" width=69><COL style="WIDTH: 48pt" span=2 width=64><TBODY>
</TBODY>