Hello all,
I need some help writing a macro. I'll explain my situation with an example.
I have some workbooks which contain worksheets that look similar to this:
<table border="0" cellpadding="0" cellspacing="0" width="256"><col style="width:48pt" span="4" width="64"> <tbody><tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt;width:48pt" height="17" width="64">aa</td> <td class="xl63" style="width:48pt" width="64">bb</td> <td class="xl63" style="width:48pt" width="64">cc</td> <td class="xl63" style="width:48pt" width="64">dd</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">8</td> <td class="xl63">1</td> <td class="xl63">unstable</td> <td class="xl63">16</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">8</td> <td class="xl63">2</td> <td class="xl63">unstable</td> <td class="xl63">32</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">8</td> <td class="xl63">3</td> <td class="xl63">unstable</td> <td class="xl63">48</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">8</td> <td class="xl63">4</td> <td class="xl63">0</td> <td class="xl63">64</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">9</td> <td class="xl63">6</td> <td class="xl63">0</td> <td class="xl63">102</td> </tr> </tbody></table>
Assume that the cell containing 'aa' is at E3. Columns 'aa', 'bb' and 'dd' are results of formulae. Column 'cc' is the result of an IF statement.
In the different sheets, the number of 'unstables' will vary.
How can I write a macro stored in another workbook that will access every workbook(in a folder) and therefore every sheet and extract the values of aa and bb for the row with the last 'unstable'?(in the example, it would be the row with aa=8 and bb=3)
Lovi
I need some help writing a macro. I'll explain my situation with an example.
I have some workbooks which contain worksheets that look similar to this:
<table border="0" cellpadding="0" cellspacing="0" width="256"><col style="width:48pt" span="4" width="64"> <tbody><tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt;width:48pt" height="17" width="64">aa</td> <td class="xl63" style="width:48pt" width="64">bb</td> <td class="xl63" style="width:48pt" width="64">cc</td> <td class="xl63" style="width:48pt" width="64">dd</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">8</td> <td class="xl63">1</td> <td class="xl63">unstable</td> <td class="xl63">16</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">8</td> <td class="xl63">2</td> <td class="xl63">unstable</td> <td class="xl63">32</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">8</td> <td class="xl63">3</td> <td class="xl63">unstable</td> <td class="xl63">48</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">8</td> <td class="xl63">4</td> <td class="xl63">0</td> <td class="xl63">64</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl63" style="height:12.75pt" height="17">9</td> <td class="xl63">6</td> <td class="xl63">0</td> <td class="xl63">102</td> </tr> </tbody></table>
Assume that the cell containing 'aa' is at E3. Columns 'aa', 'bb' and 'dd' are results of formulae. Column 'cc' is the result of an IF statement.
In the different sheets, the number of 'unstables' will vary.
How can I write a macro stored in another workbook that will access every workbook(in a folder) and therefore every sheet and extract the values of aa and bb for the row with the last 'unstable'?(in the example, it would be the row with aa=8 and bb=3)
Lovi