Akshay_divecha
Board Regular
- Joined
- Mar 11, 2014
- Messages
- 70
Hi Experts,
I'm basically a noob when it comes to creating macros in excel.
I find the below issue seems to be more of a loop point. Kindly assist. Thanks in advance.
Workbook 1
I have 25 columns with variable rows.
Here the 14 Column needs to be filtered. 14 Column name is "Type of Vehicle"
Say for example Status column usually contains values of (for example) "Auto" , "Bus" ,"Train etc."
So what I would like to achieve is
1.Apply autofilter first -> Range("A1:Y1").autofilter
2.Filter "Type of Vehicle" column for each value in that column like the above three example criteria stated above
3.Open a new workbook 2 (this already has a predetermined format & details in it already)
4.Copy Data from Workbook 1 cell U2 and Paste it to new workbook 2 G3
5.Copy Data from Workbook 1 cell V2 and Paste it to new workbook 2 I3
6.Copy Data from Workbook 1 cell N2 and Paste it to new workbook 2 D9
7.Copy Data from Workbook 1 cell 02 and Paste it to new workbook 2 F9
8.Copy Data from Workbook 1 cell F:J and Paste it to new workbook 2 A19
9.Save the workbook 2 with the name as D9 & F9
10. Repeat the same for other values in "Type of vehicle"
11. Pop up once all done.
I'm basically a noob when it comes to creating macros in excel.
I find the below issue seems to be more of a loop point. Kindly assist. Thanks in advance.
Workbook 1
I have 25 columns with variable rows.
Here the 14 Column needs to be filtered. 14 Column name is "Type of Vehicle"
Say for example Status column usually contains values of (for example) "Auto" , "Bus" ,"Train etc."
So what I would like to achieve is
1.Apply autofilter first -> Range("A1:Y1").autofilter
2.Filter "Type of Vehicle" column for each value in that column like the above three example criteria stated above
3.Open a new workbook 2 (this already has a predetermined format & details in it already)
4.Copy Data from Workbook 1 cell U2 and Paste it to new workbook 2 G3
5.Copy Data from Workbook 1 cell V2 and Paste it to new workbook 2 I3
6.Copy Data from Workbook 1 cell N2 and Paste it to new workbook 2 D9
7.Copy Data from Workbook 1 cell 02 and Paste it to new workbook 2 F9
8.Copy Data from Workbook 1 cell F:J and Paste it to new workbook 2 A19
9.Save the workbook 2 with the name as D9 & F9
10. Repeat the same for other values in "Type of vehicle"
11. Pop up once all done.