Macro for Filter data

Negi1984

Board Regular
Joined
May 6, 2011
Messages
199
Hi All,

I have data in column E & F in below sample format :-
[TABLE="width: 279"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]GRO1
[/TD]
[TD]GR1
[/TD]
[/TR]
[TR]
[TD]12345678
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]Before GRO process
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]No initial GRO required
[/TD]
[TD="align: center"]TRUE
[/TD]
[/TR]
[TR]
[TD]No initial GRO required
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]Multitech
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]74704238
[/TD]
[TD="align: center"]TRUE
[/TD]
[/TR]
[TR]
[TD]74704515
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]74704510 - Amendment
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]74705102
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]74704962
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]74705231
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]74704531- Rejected 74704532
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD="align: right"]74705192
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]74704531- Rejected -74704532
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]74705193
[/TD]
[TD="align: center"]TRUE
[/TD]
[/TR]
[TR]
[TD]74704512 - Amendment 74704513
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]74705017
[/TD]
[TD="align: center"]FALSE
[/TD]
[/TR]
[TR]
[TD]
Now I need to filter it with Macro and condition will be Column F should be false and and column E should contains all the numbers and rows if it contains Rejected /Amendments in beginning and end of the text.

Could you please assist , how to write the VBA code for the same.

Regards,
Rajender
[/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]

Sample Output is below :-


[TABLE="width: 280"]
<tbody>[TR]
[TD="colspan: 2"]Output[/TD]
[/TR]
[TR]
[TD]GRO1[/TD]
[TD]GR1[/TD]
[/TR]
[TR]
[TD]12345678[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD="align: right"]74705192[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD]74704515[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD]74705102[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD]74704962[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD]74705231[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD]74704531- Rejected 74704532[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD]74704531- Rejected -74704532[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD]74704512 - Amendment 74704513[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD]74705017[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]
 
Last edited:

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

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