Complex Filtering process

2011everafter

Board Regular
Joined
Oct 5, 2011
Messages
129
Dear Helpers,

Another complex scenario , I need to filter the below data base based on the 1ST time , provided the Trip Sequence follows the 1ST time.

Data Base:-

<TABLE style="WIDTH: 330pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=440><COLGROUP><COL style="WIDTH: 42pt; mso-width-source: userset; mso-width-alt: 2048" width=56><COL style="WIDTH: 48pt" span=6 width=64><TBODY><TR style="HEIGHT: 26.25pt" height=35><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #c5d9f1; WIDTH: 42pt; HEIGHT: 26.25pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 height=35 width=56>TRIP#

</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>1ST TIME </TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>Trip Code</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>Count</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>1st Stn</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>2nd Stn</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>Trip Sequence</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #efefef; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 height=21 width=56>XXX0741</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64 align=right>1230</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64>$AA32</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64 align=right>70</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64>CDG</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64>FRA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64 align=right>3270001</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #b8cce4; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 height=21 width=56>XXX1108</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64 align=right>800</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64>$BBK</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64 align=right>142</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64>LHR</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64>AMS</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64 align=right>3270002</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #b8cce4; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 height=21 width=56>XXX0740</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64 align=right>1225</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64>$CC32</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64 align=right>124</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64>AMS</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64>GVA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64 align=right>3270002</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #efefef; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 height=21 width=56>XXX0144</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64 align=right>1150</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64>$DDA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64 align=right>98</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64>CDG</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64>DUB</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #efefef; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64 align=right>3270003</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #e6b8b7; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl69 height=21 width=56>XXX1032</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl69 width=64 align=right>1030</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl69 width=64>$MM19</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl69 width=64 align=right>47</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl69 width=64>BRU</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl69 width=64>AMS</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl70 width=64 align=right>3270004</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #ccc0da; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl71 height=21 width=56>XXX0510</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl71 width=64 align=right>1410</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl71 width=64>$VV19</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl71 width=64 align=right>132</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl71 width=64>AMS</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl71 width=64>GVA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl72 width=64 align=right>5270004</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #fabf8f; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl73 height=21 width=56>XXX0511</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl73 width=64 align=right>1835</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl73 width=64>$VV19</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl73 width=64 align=right>84</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl73 width=64>GVA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl73 width=64>CDG</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl74 width=64 align=right>6270004</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: yellow; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 height=21 width=56>XXX1145</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64 align=right>1230</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64>$KK31</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64 align=right>133</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64>FCO</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64>ATH</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64 align=right>3270005</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: yellow; WIDTH: 42pt; HEIGHT: 15pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 height=20 width=56>XXX1047</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64 align=right>1700</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64>$KK31</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64 align=right>132</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64>ATH</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64>CDG</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64 align=right>3270005

</TD></TR></TBODY></TABLE>


When I do the filtering by the 1ST time , I want also all the matching Trip Sequence follow the 1St time.

I want the filter to show :-

<TABLE style="WIDTH: 330pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=440><COLGROUP><COL style="WIDTH: 42pt; mso-width-source: userset; mso-width-alt: 2048" width=56><COL style="WIDTH: 48pt" span=6 width=64><TBODY><TR style="HEIGHT: 26.25pt" height=35><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #c5d9f1; WIDTH: 42pt; HEIGHT: 26.25pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" id=td_post_2920692 class=xl65 height=35 width=56>TRIP#

</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>1ST TIME </TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>Trip Code</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>Count</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>1st Stn</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>2nd Stn</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c5d9f1; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl65 width=64>Trip Sequence</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #b8cce4; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 height=21 width=56>XXX1108</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64 align=right>800</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64>$BBK</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64 align=right>142</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64>LHR</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64>AMS</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64 align=right>3270002</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #b8cce4; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 height=21 width=56>XXX0740</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64 align=right>1225</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64>$CC32</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64 align=right>124</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64>AMS</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64>GVA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #b8cce4; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl67 width=64 align=right>3270002</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #e6b8b7; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 height=21 width=56>XXX1032</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64 align=right>1030</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64>$MM19</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64 align=right>47</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64>BRU</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl68 width=64>AMS</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #e6b8b7; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl69 width=64 align=right>3270004</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #92d050; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 height=21 width=56>XXX0144</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #92d050; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64 align=right>1150</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #92d050; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64>$DDA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #92d050; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64 align=right>98</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #92d050; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64>CDG</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #92d050; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64>DUB</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #92d050; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl75 width=64 align=right>3270003</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #c0504d; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl76 height=21 width=56>XXX0741</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c0504d; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl76 width=64 align=right>1230</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c0504d; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl76 width=64>$AA32</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c0504d; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl76 width=64 align=right>70</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c0504d; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl76 width=64>CDG</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c0504d; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl76 width=64>FRA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #c0504d; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl76 width=64 align=right>3270001</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: yellow; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 height=21 width=56>XXX1145</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64 align=right>1230</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64>$KK31</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64 align=right>133</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64>FCO</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64>ATH</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl66 width=64 align=right>3270005</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: yellow; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl74 height=21 width=56>XXX1047</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl74 width=64 align=right>1700</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl74 width=64>$KK31</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl74 width=64 align=right>132</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl74 width=64>ATH</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl74 width=64>CDG</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: yellow; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl74 width=64 align=right>3270005</TD></TR>

<TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #ccc0da; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl70 height=21 width=56>XXX0510</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl70 width=64 align=right>1410</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl70 width=64>$VV19</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl70 width=64 align=right>132</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl70 width=64>AMS</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl70 width=64>GVA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #ccc0da; WIDTH: 48pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl71 width=64 align=right>5270004</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #fabf8f; WIDTH: 42pt; HEIGHT: 15.75pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl72 height=21 width=56>XXX0511</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl72 width=64 align=right>1835</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl72 width=64>$VV19</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl72 width=64 align=right>84</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl72 width=64>GVA</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl72 width=64>CDG</TD><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6; BACKGROUND-COLOR: #fabf8f; WIDTH: 48pt; BORDER-TOP: #3867a6; BORDER-RIGHT: #3867a6 1pt solid" class=xl73 width=64 align=right>6270004</TD></TR></TBODY></TABLE>


Thank you.
 
Last edited:
Why don't you run the blah macro on the DeskA sheet before running the DeskA macro to copy it over to the SDT file sheet?
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Thanks,

DeskA is only one data sheet , I have 8 data sheets and 8 MACROs each of which transfers the data to the SDT file so I can run the filtering.

Regards.
 
Upvote 0
One other reason is that , I want the data on those 8 sheets remain intact , so when I want to filter them I would transfer them to the SDT file and run the filtering there.

Thanks.
 
Upvote 0
So you have a macro like DeskA for each of the others?
Since blah works on the active sheet, you could call blah from those macros after activating one of those sheets, but before copying across to SDT file.
[Better still, a few minor tweaks to blah, so that it is passed the sheet it has to act upon.]
Anyway, as it stands, you could just change DeskA macro to:
Code:
With Sheets("DeskA")
  .Select
  blah
  .Range("A2:J601").Copy Sheets("SDT file").Range("A2")
End With
Sheets("SDT File").select
The chances are you'll only have to change one line, the first one.

You could even reduce those 8 macros to one, and call it with the sheet in question as an argument:
Code:
Sub DeskA2(theSheet As Worksheet)
With theSheet
  .Select
  blah
  .Range("A2:J601").Copy Sheets("SDT file").Range("A2")
End With
Sheets("SDT File").Select
End Sub
(Now edits you want to make only happen in one place, so much faster and less error prone than editing each of those 8 macros) then your 8 macros (each I guess assigned to a button) can just be like:
Code:
Sub macroA()
DeskA2 Sheets("DeskA")
End Sub
or:
Code:
Sub macroB()
DeskA2 Sheets("DeskB")
End Sub
As touched upon earlier, if blah was also tweaked to accept arguments, there'd be no need to do any selecting whatsoever, and the user would have the same cell(s) selected in the same sheet both before and after the macro was run, and it would be faster.
So, if tweaks were to be made to blah to accept arguments (like DeskA2 does above) then DeskA2 would become shorter:
Code:
Sub DeskA2(theSheet As Worksheet)
  blah theSheet
  theSheet.Range("A2:J601").Copy Sheets("SDT file").Range("A2")
End Sub
So you can see, with the above, that the number of code lines can be reduced an awful lot, making the whole application more robust, quicker, easier and faster to edit.
 
Upvote 0
One other reason is that , I want the data on those 8 sheets remain intact , so when I want to filter them I would transfer them to the SDT file and run the filtering there.

Thanks.
OK, I've just seen this, still I think that the sorting should be done before copying to SDT file, but I can't code it right now (it will involve copying the sheet DeskA to a temporary sheet first, sorting that new sheet with blah, copying the sorted data from it to 'SDT file' and then deleting the temporary sheet). It will still be more robust than trying to re-adjust formulae, or prevent formulae from changing, or reinserting the formulae, on the 'SDT file' sheet.
 
Upvote 0
Your thread #74 is interesting, I might as well change the concept and go with your suggestion.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
Let me see how it fits and I will come back to you.<o:p></o:p>

Many thanks.<o:p></o:p>
 
Upvote 0
So you have a macro like DeskA for each of the others?
Since blah works on the active sheet, you could call blah from those macros after activating one of those sheets, but before copying across to SDT file.
[Better still, a few minor tweaks to blah, so that it is passed the sheet it has to act upon.]
Anyway, as it stands, you could just change DeskA macro to:
Code:
With Sheets("DeskA")
  .Select
  blah
  .Range("A2:J601").Copy Sheets("SDT file").Range("A2")
End With
Sheets("SDT File").select
The chances are you'll only have to change one line, the first one.

You could even reduce those 8 macros to one, and call it with the sheet in question as an argument:
Code:
Sub DeskA2(theSheet As Worksheet)
With theSheet
  .Select
  blah
  .Range("A2:J601").Copy Sheets("SDT file").Range("A2")
End With
Sheets("SDT File").Select
End Sub
(Now edits you want to make only happen in one place, so much faster and less error prone than editing each of those 8 macros) then your 8 macros (each I guess assigned to a button) can just be like:
Code:
Sub macroA()
DeskA2 Sheets("DeskA")
End Sub
or:
Code:
Sub macroB()
DeskA2 Sheets("DeskB")
End Sub
As touched upon earlier, if blah was also tweaked to accept arguments, there'd be no need to do any selecting whatsoever, and the user would have the same cell(s) selected in the same sheet both before and after the macro was run, and it would be faster.
So, if tweaks were to be made to blah to accept arguments (like DeskA2 does above) then DeskA2 would become shorter:
Code:
Sub DeskA2(theSheet As Worksheet)
  blah theSheet
  theSheet.Range("A2:J601").Copy Sheets("SDT file").Range("A2")
End Sub
So you can see, with the above, that the number of code lines can be reduced an awful lot, making the whole application more robust, quicker, easier and faster to edit.

I have tested the 1st option and it works fine, but I could not understand the other options :-

1) Reduce the 8 macros to one
Question : how then would I run the MACROs on demand ?

2) As touched upon earlier, if blah was also tweaked to accept arguments, there'd be no need to do any selecting whatsoever, and the user would have the same cell(s) selected in the same sheet both before and after the macro was run, and it would be faster.
So, if tweaks were to be made to blah to accept arguments (like DeskA2 does above) then DeskA2 would become shorter:

Code:

Sub DeskA2(theSheet As Worksheet) blah theSheet theSheet.Range("A2:J601").Copy Sheets("SDT file").Range("A2")End Sub</PRE>
If not too much to ask , but can you kindly email me a sample workbook with these options. or guide me thru on how to creat them.

Regards.
 
Upvote 0
Hello

Ok, I did some test by incorporating 4 macros in one as follows:

On DeskA macro I added a reference to other MACROs

Sheets("SDT file"),Select
Range ("A2").Select
runSkd
filterSkd
DistributeSkd
CopySKD
End Sub

Guess what?, It worked perfect, thank you very much for making it easy.

I dont know if this is what you meant on the examples you gave me?

but , the thing I got confused about is how to go by doing Sub MacroA , Sub MacroB and then DeskA2.

My Question is :-

1) do I have to name each ( total 8 ) MACROs as macroA , macroB , macroC e.t.c
2) then, what do I do next, is it create another macro called DeskA2 and add all of them to it?

Thank you for your help.
 
Upvote 0
You've responded here since I sent you a file by direct email last night. Have you received same?
I will not continue here as other's will know little of what we're discussing and you don't want your data in the public domain.
 
Upvote 0
Thank you,

I did not realize you already sent it by email when I responded here, but many thanks, I will go thru the steps , the combining of MACROs is the best to say the least.

Your help is very much appreciated.

Regards.
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,392
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top