S
shriil
I have 2 excel files regarding daily values of two equities that I
download from the internet on a regular basis.
Each xls file has the following columns and rows for that particular
equity. For eg. EquityA.xls will have :
Symbol Date Open
High Close Turnover
A 01-jan-09 43.5
52 46 1496.53
A 02-jan-09 47
49 42 1322.44
A 03-jan-09 40
54 49 1676.02
A 06-jan-09 44
50 45 1452.81
Similarly EquityB.xls shall have its values as per the same format.
Now I have a Combine.xls file where I copy and paste the daily values
for both the equities, derived from the parent files. The Combine.xls
file has the following fields
Symbol Date Open High Close Turnover Symbol Date
Open High Close Turnover
A 01-jan-09 43.5 52 46 1496.53 B
01-jan-09 76 81 72.5 458.5
A 02-jan-09 47 49 42 1322.44
B 01-jan-09 73 80.6 80 478.0
A 03-jan-09 40 54 49 1676.02
B 01-jan-09 68 75.7 74 496.22
A 06-jan-09 44 50 45 1452.81
B 01-jan-09 70 78.4 69 488.64
Therefore for each new date, I select the corresponding fields in
EquityA.xls and paste it in a new row in Combine.xls. Similarly I copy
the corresponding fields in EquityB.xls and paste it just beside the
last pasted field in Combine.xls
Is there a way, where I can run a macro which
(a) Selects the Range which has data in the EquityA. xls File, copies
the same and pastes it at a predefined location in Combine.xls
(b) Selects the Range which has data in the EquityB.xls File, does the
same thing and pastes it just after the previously last pasted field
in combine.xls
Thks
Shriil
download from the internet on a regular basis.
Each xls file has the following columns and rows for that particular
equity. For eg. EquityA.xls will have :
Symbol Date Open
High Close Turnover
A 01-jan-09 43.5
52 46 1496.53
A 02-jan-09 47
49 42 1322.44
A 03-jan-09 40
54 49 1676.02
A 06-jan-09 44
50 45 1452.81
Similarly EquityB.xls shall have its values as per the same format.
Now I have a Combine.xls file where I copy and paste the daily values
for both the equities, derived from the parent files. The Combine.xls
file has the following fields
Symbol Date Open High Close Turnover Symbol Date
Open High Close Turnover
A 01-jan-09 43.5 52 46 1496.53 B
01-jan-09 76 81 72.5 458.5
A 02-jan-09 47 49 42 1322.44
B 01-jan-09 73 80.6 80 478.0
A 03-jan-09 40 54 49 1676.02
B 01-jan-09 68 75.7 74 496.22
A 06-jan-09 44 50 45 1452.81
B 01-jan-09 70 78.4 69 488.64
Therefore for each new date, I select the corresponding fields in
EquityA.xls and paste it in a new row in Combine.xls. Similarly I copy
the corresponding fields in EquityB.xls and paste it just beside the
last pasted field in Combine.xls
Is there a way, where I can run a macro which
(a) Selects the Range which has data in the EquityA. xls File, copies
the same and pastes it at a predefined location in Combine.xls
(b) Selects the Range which has data in the EquityB.xls File, does the
same thing and pastes it just after the previously last pasted field
in combine.xls
Thks
Shriil