I have a macro project I need some help with. I have a source workbook that has one worksheet. This worksheet has row 1 as a header row. There could be up to 84 additional rows but this will sometimes vary. The columns used are A:AC. Column A will have either “MAX” or “MIN” as text. Column B will be text while columns C:AC will be numeric values. The rows will be sorted so that all “MAX” rows are together followed by all of the “MIN” rows.
Excel 2012
<tbody>
</tbody>
I have a read-only target workbook with multiple sheets. Two of these sheets are titled “Max Data” and “Min Data”. The source and target files are not in the same directory.
After the user has the target file open I’m looking to do the following:
Any help would be greatly appreciated!
Excel 2012
A | B | C | D | |
---|---|---|---|---|
1 | SAMPLE | P | R | |
2 | MAX | D15-00-01-1 | 0.0195 | 0.0201 |
3 | MAX | D15-00-01-11 | 0.0415 | 0.0335 |
4 | MAX | D15-00-01-12 | 0.0575 | 0.0441 |
5 | MAX | D15-00-01-13 | 0.0226 | 0.0202 |
6 | MAX | D15-00-01-2 | 0.016 | 0.0138 |
7 | MAX | D15-00-01-3 | 0.042 | 0.0444 |
8 | MAX | D15-00-01-5 | 0.0113 | 0.0118 |
9 | MAX | D15-00-01-6 | 0.0318 | 0.02 |
10 | MAX | D15-00-01-7 | 0.0139 | 0.0124 |
11 | MAX | D15-00-01-8 | 0.0171 | 0.016 |
12 | MAX | D15-00-01-9 | 0.0104 | 0.0227 |
13 | MIN | D15-00-01-1 | -0.0017 | -0.0028 |
14 | MIN | D15-00-01-11 | -0.0016 | -0.0029 |
15 | MIN | D15-00-01-12 | 0.0031 | -0.0013 |
16 | MIN | D15-00-01-13 | -0.0021 | -0.0027 |
17 | MIN | D15-00-01-2 | -0.0025 | -0.0029 |
18 | MIN | D15-00-01-3 | 0.0014 | -0.0015 |
19 | MIN | D15-00-01-5 | -0.0028 | -0.0036 |
20 | MIN | D15-00-01-6 | 0.0009 | -0.0023 |
21 | MIN | D15-00-01-7 | -0.0026 | -0.0027 |
22 | MIN | D15-00-01-8 | 0.0004 | -0.0026 |
23 | MIN | D15-00-01-9 | -0.0026 | -0.0034 |
<tbody>
</tbody>
5319104 Sample PROFILE DATA
I have a read-only target workbook with multiple sheets. Two of these sheets are titled “Max Data” and “Min Data”. The source and target files are not in the same directory.
After the user has the target file open I’m looking to do the following:
1. User selects the source file via an OpenDialog box
2. All rows in the source file that have “MAX” in column A are copied and pasted into the “Max Data” sheet in the target file. The range to copy would be B:AC and the target range in the target file would be the same.
3. All rows in the source file that have “MIN” in column A are copied and pasted into the “Min Data” sheet in the target file. The range to copy would be B:AC and the target range in the target file would be the same.
4. Close the source file without saving.
5. Close the target file using a Save As dialog box so the user selects the location and filename.
Any help would be greatly appreciated!
Last edited: