AJaxEmpire
New Member
- Joined
- Nov 9, 2014
- Messages
- 2
Greetings,
I am new to VBA and have the following query.
I have a sheet with data in range A1:CL94.
Row 1, 2 and 3 are headers. Row 4 is the filter header.
A:A are the data to be filtered. Below table shows what it looks like.
I need a macro that would Copy all 4 headers, filter the data by each Area with the Total, and creat a new sheets with each of the Area Name. There are 9 areas currently that can be specified.
Any help is greatly appreciated. Merry Christmas and a Happy new year.
[TABLE="width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]CL[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]Header[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]Header[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]Header[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]Filter Header[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]Area 1[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD]Area 1[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]Total Area 1[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD]Area 2[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD]Area 2[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD]Area 2[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]Total Area 2[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD]Area 3[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
</tbody>[/TABLE]
I am new to VBA and have the following query.
I have a sheet with data in range A1:CL94.
Row 1, 2 and 3 are headers. Row 4 is the filter header.
A:A are the data to be filtered. Below table shows what it looks like.
I need a macro that would Copy all 4 headers, filter the data by each Area with the Total, and creat a new sheets with each of the Area Name. There are 9 areas currently that can be specified.
Any help is greatly appreciated. Merry Christmas and a Happy new year.
[TABLE="width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]CL[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]Header[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]Header[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]Header[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]Filter Header[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]Area 1[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD]Area 1[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]Total Area 1[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD]Area 2[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD]Area 2[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD]Area 2[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]Total Area 2[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD]Area 3[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
</tbody>[/TABLE]