Hi there,
I need a macro which can able to create an excel with 3 sheets based on the following criteria.
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl67, width: 64"]Name[/TD]
[TD="class: xl67, width: 64"]Age[/TD]
[TD="class: xl67, width: 64"]Gender[/TD]
[TD="class: xl67, width: 64"]Salary[/TD]
[/TR]
[TR]
[TD="class: xl65"]Ram[/TD]
[TD="class: xl68"]25[/TD]
[TD="class: xl69"]M[/TD]
[TD="class: xl65, align: right"]10000[/TD]
[/TR]
[TR]
[TD="class: xl65"]Ganesh[/TD]
[TD="class: xl69"]23[/TD]
[TD="class: xl68"]M[/TD]
[TD="class: xl65, align: right"]2000[/TD]
[/TR]
[TR]
[TD="class: xl65"]Saleem[/TD]
[TD="class: xl69"]10[/TD]
[TD="class: xl69"]M[/TD]
[TD="class: xl65, align: right"]62300[/TD]
[/TR]
[TR]
[TD="class: xl65"]Antony[/TD]
[TD="class: xl68"]26[/TD]
[TD="class: xl71"]M[/TD]
[TD="class: xl65, align: right"]85000[/TD]
[/TR]
[TR]
[TD="class: xl66"]Jebestine[/TD]
[TD="class: xl70"]30[/TD]
[TD="class: xl70"]M[/TD]
[TD="class: xl66, align: right"]36900[/TD]
[/TR]
[TR]
[TD="class: xl66"]Sheela[/TD]
[TD="class: xl70"]26[/TD]
[TD="class: xl70"]F[/TD]
[TD="class: xl66, align: right"]45630[/TD]
[/TR]
[TR]
[TD="class: xl66"]Karen[/TD]
[TD="class: xl70"]96[/TD]
[TD="class: xl70"]F[/TD]
[TD="class: xl66, align: right"]25300[/TD]
[/TR]
[TR]
[TD="class: xl66"]Veni[/TD]
[TD="class: xl70"]31[/TD]
[TD="class: xl70"]F[/TD]
[TD="class: xl66, align: right"]63900[/TD]
[/TR]
</tbody>[/TABLE]
Here based on the above table, I require a single separate excel with 3 sheets named "Age", "Gender", "Salary". The sheet age must contains Column B red colored text info (the whole row). Gender must contains Column C red color text (the whole row). Salary sheet must contains which there is no color in Column B and C.
Examble.
Age Sheet:
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]Name[/TD]
[TD="class: xl67, width: 64"]Age[/TD]
[TD="class: xl67, width: 64"]Gender[/TD]
[TD="class: xl65, width: 64"]Salary[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Ganesh[/TD]
[TD="class: xl68, width: 64"]23[/TD]
[TD="class: xl67, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]2000[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Antony[/TD]
[TD="class: xl68, width: 64"]26[/TD]
[TD="class: xl68, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]85000[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Sheela[/TD]
[TD="class: xl68, width: 64"]26[/TD]
[TD="class: xl68, width: 64"]F[/TD]
[TD="class: xl66, width: 64"]45630[/TD]
[/TR]
</tbody>[/TABLE]
"Gender" Sheet:
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]Name[/TD]
[TD="class: xl67, width: 64"]Age[/TD]
[TD="class: xl67, width: 64"]Gender[/TD]
[TD="class: xl65, width: 64"]Salary[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Saleem[/TD]
[TD="class: xl67, width: 64"]10[/TD]
[TD="class: xl68, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]62300[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Antony[/TD]
[TD="class: xl68, width: 64"]26[/TD]
[TD="class: xl68, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]85000[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Sheela[/TD]
[TD="class: xl68, width: 64"]26[/TD]
[TD="class: xl68, width: 64"]F[/TD]
[TD="class: xl66, width: 64"]45630[/TD]
[/TR]
</tbody>[/TABLE]
"Salary" Sheet:
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]Name[/TD]
[TD="class: xl67, width: 64"]Age[/TD]
[TD="class: xl67, width: 64"]Gender[/TD]
[TD="class: xl65, width: 64"]Salary[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Ram[/TD]
[TD="class: xl67, width: 64"]25[/TD]
[TD="class: xl67, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]10000[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Karen[/TD]
[TD="class: xl67, width: 64"]96[/TD]
[TD="class: xl67, width: 64"]F[/TD]
[TD="class: xl66, width: 64"]25300[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Veni[/TD]
[TD="class: xl67, width: 64"]31[/TD]
[TD="class: xl67, width: 64"]F[/TD]
[TD="class: xl66, width: 64"]63900
[/TD]
[/TR]
</tbody>[/TABLE]
Hope I am clear in what am asking.
Kindly take it as challenge and do this. I tried in many ways, but i couldnt do it.
Thanks,
Gopal
I need a macro which can able to create an excel with 3 sheets based on the following criteria.
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl67, width: 64"]Name[/TD]
[TD="class: xl67, width: 64"]Age[/TD]
[TD="class: xl67, width: 64"]Gender[/TD]
[TD="class: xl67, width: 64"]Salary[/TD]
[/TR]
[TR]
[TD="class: xl65"]Ram[/TD]
[TD="class: xl68"]25[/TD]
[TD="class: xl69"]M[/TD]
[TD="class: xl65, align: right"]10000[/TD]
[/TR]
[TR]
[TD="class: xl65"]Ganesh[/TD]
[TD="class: xl69"]23[/TD]
[TD="class: xl68"]M[/TD]
[TD="class: xl65, align: right"]2000[/TD]
[/TR]
[TR]
[TD="class: xl65"]Saleem[/TD]
[TD="class: xl69"]10[/TD]
[TD="class: xl69"]M[/TD]
[TD="class: xl65, align: right"]62300[/TD]
[/TR]
[TR]
[TD="class: xl65"]Antony[/TD]
[TD="class: xl68"]26[/TD]
[TD="class: xl71"]M[/TD]
[TD="class: xl65, align: right"]85000[/TD]
[/TR]
[TR]
[TD="class: xl66"]Jebestine[/TD]
[TD="class: xl70"]30[/TD]
[TD="class: xl70"]M[/TD]
[TD="class: xl66, align: right"]36900[/TD]
[/TR]
[TR]
[TD="class: xl66"]Sheela[/TD]
[TD="class: xl70"]26[/TD]
[TD="class: xl70"]F[/TD]
[TD="class: xl66, align: right"]45630[/TD]
[/TR]
[TR]
[TD="class: xl66"]Karen[/TD]
[TD="class: xl70"]96[/TD]
[TD="class: xl70"]F[/TD]
[TD="class: xl66, align: right"]25300[/TD]
[/TR]
[TR]
[TD="class: xl66"]Veni[/TD]
[TD="class: xl70"]31[/TD]
[TD="class: xl70"]F[/TD]
[TD="class: xl66, align: right"]63900[/TD]
[/TR]
</tbody>[/TABLE]
Here based on the above table, I require a single separate excel with 3 sheets named "Age", "Gender", "Salary". The sheet age must contains Column B red colored text info (the whole row). Gender must contains Column C red color text (the whole row). Salary sheet must contains which there is no color in Column B and C.
Examble.
Age Sheet:
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]Name[/TD]
[TD="class: xl67, width: 64"]Age[/TD]
[TD="class: xl67, width: 64"]Gender[/TD]
[TD="class: xl65, width: 64"]Salary[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Ganesh[/TD]
[TD="class: xl68, width: 64"]23[/TD]
[TD="class: xl67, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]2000[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Antony[/TD]
[TD="class: xl68, width: 64"]26[/TD]
[TD="class: xl68, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]85000[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Sheela[/TD]
[TD="class: xl68, width: 64"]26[/TD]
[TD="class: xl68, width: 64"]F[/TD]
[TD="class: xl66, width: 64"]45630[/TD]
[/TR]
</tbody>[/TABLE]
"Gender" Sheet:
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]Name[/TD]
[TD="class: xl67, width: 64"]Age[/TD]
[TD="class: xl67, width: 64"]Gender[/TD]
[TD="class: xl65, width: 64"]Salary[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Saleem[/TD]
[TD="class: xl67, width: 64"]10[/TD]
[TD="class: xl68, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]62300[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Antony[/TD]
[TD="class: xl68, width: 64"]26[/TD]
[TD="class: xl68, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]85000[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Sheela[/TD]
[TD="class: xl68, width: 64"]26[/TD]
[TD="class: xl68, width: 64"]F[/TD]
[TD="class: xl66, width: 64"]45630[/TD]
[/TR]
</tbody>[/TABLE]
"Salary" Sheet:
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]Name[/TD]
[TD="class: xl67, width: 64"]Age[/TD]
[TD="class: xl67, width: 64"]Gender[/TD]
[TD="class: xl65, width: 64"]Salary[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Ram[/TD]
[TD="class: xl67, width: 64"]25[/TD]
[TD="class: xl67, width: 64"]M[/TD]
[TD="class: xl66, width: 64"]10000[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Karen[/TD]
[TD="class: xl67, width: 64"]96[/TD]
[TD="class: xl67, width: 64"]F[/TD]
[TD="class: xl66, width: 64"]25300[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Veni[/TD]
[TD="class: xl67, width: 64"]31[/TD]
[TD="class: xl67, width: 64"]F[/TD]
[TD="class: xl66, width: 64"]63900
[/TD]
[/TR]
</tbody>[/TABLE]
Hope I am clear in what am asking.
Kindly take it as challenge and do this. I tried in many ways, but i couldnt do it.
Thanks,
Gopal