T
tkraju via OfficeKB.com
I am looking for code that can do the following task.
I have a downloaded file named "SalesReport.csv" contains source data about
900 rows.Data in the file looks as below.
Col A-----Col B-------Col C---------Col D--------Col E
1 name ----CityCode-- Date ---------UnitsSold-- SaleValue
2.Smith --- MB -------12-Feb-07--- 52 ---- 30052
3.Philips -- BE --------- 12-Feb-07 --- 41 ------ 24065
4.Ravi ---- MB ---------12-Feb-07 ---- 39 ------- 22100
5.Carol ---MB --------12-Feb-07 ----- 50 ------- 28600
I have a w/book contains about 150 w/sheets,all renamed as "SalesReport.csv"
Col A:A names.
Sheet 1 renamed as 'Carol',Sheet2 renamed as "Ravi',Sheet 3 renamed as
"Smith' like this.
Data in the sheet looks as below.
Col A---------Col B ---------Col C
1 Date ---------UnitsSold ---SaleValue
2.10-Feb-07 -- 48 ------- 27645
3.11-Feb-07 --- 47 ------- 27102
My task is If Sheet1 name exists in "SalesReport.csv" Col A:A range and
CityCode=MB,copythat row's data(C:E) and paste these values next to last row
of Sheet1.If Sheet1 name does not exists or CityCode does not matches do
nothing.Loop through all other sheets of W/book and do the same task.
As per my sample data,if I run the maco,Sheet1 name(Carol) exists in Col A:A
of SalesReport.csv
and CityCode is also "MB',so the data values of that row (12-Feb-07,50,28600)
are to be copied and pasted at row 4 in 'Carol' sheet.Then goto next sheet.
I shall be thankful if anybody helps me .
I have a downloaded file named "SalesReport.csv" contains source data about
900 rows.Data in the file looks as below.
Col A-----Col B-------Col C---------Col D--------Col E
1 name ----CityCode-- Date ---------UnitsSold-- SaleValue
2.Smith --- MB -------12-Feb-07--- 52 ---- 30052
3.Philips -- BE --------- 12-Feb-07 --- 41 ------ 24065
4.Ravi ---- MB ---------12-Feb-07 ---- 39 ------- 22100
5.Carol ---MB --------12-Feb-07 ----- 50 ------- 28600
I have a w/book contains about 150 w/sheets,all renamed as "SalesReport.csv"
Col A:A names.
Sheet 1 renamed as 'Carol',Sheet2 renamed as "Ravi',Sheet 3 renamed as
"Smith' like this.
Data in the sheet looks as below.
Col A---------Col B ---------Col C
1 Date ---------UnitsSold ---SaleValue
2.10-Feb-07 -- 48 ------- 27645
3.11-Feb-07 --- 47 ------- 27102
My task is If Sheet1 name exists in "SalesReport.csv" Col A:A range and
CityCode=MB,copythat row's data(C:E) and paste these values next to last row
of Sheet1.If Sheet1 name does not exists or CityCode does not matches do
nothing.Loop through all other sheets of W/book and do the same task.
As per my sample data,if I run the maco,Sheet1 name(Carol) exists in Col A:A
of SalesReport.csv
and CityCode is also "MB',so the data values of that row (12-Feb-07,50,28600)
are to be copied and pasted at row 4 in 'Carol' sheet.Then goto next sheet.
I shall be thankful if anybody helps me .