mm1234mail
09-09-2010, 12:46 AM
I have an Excel file and in which there are many worksheets. The number of worksheets in the file is not fixed as the number of worksheet depends on the number of business days in the study period. It may be changed for different Excel file.
In each worksheet, I want to obtain two cell's data. The first one is cell "B2" which is the date of record, e.g. 31/07/2009, and the other cell is "E9" which is a number (actually this cell is a formula to calculate a figure from the worksheet)
Can anyone help to provide the VBA to obtain these 2 cells and to have output to show these 2 record in Excel file in 2 columns as below:
Output:
Column A Column B
31/07/2009 123,456.02
01/08/2009 456,789.11
02/08/2009 101,121.30
. .
. .
Therefore, I need the VBA that can obtain the 2 cells' data from all worksheets in the Excel file and it can be used for different Excel file, ie. I can input the file name or select the Excel file.
Thanks for your help.
In each worksheet, I want to obtain two cell's data. The first one is cell "B2" which is the date of record, e.g. 31/07/2009, and the other cell is "E9" which is a number (actually this cell is a formula to calculate a figure from the worksheet)
Can anyone help to provide the VBA to obtain these 2 cells and to have output to show these 2 record in Excel file in 2 columns as below:
Output:
Column A Column B
31/07/2009 123,456.02
01/08/2009 456,789.11
02/08/2009 101,121.30
. .
. .
Therefore, I need the VBA that can obtain the 2 cells' data from all worksheets in the Excel file and it can be used for different Excel file, ie. I can input the file name or select the Excel file.
Thanks for your help.