vba hep - Filter and count visible cells only

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
976
Office Version
  1. 2010
Platform
  1. Windows
Code:
Hi Team,

I am looking for vba syntax here to count visible cells after filtering data
Status column should be unmatched, below are Criteria. 

1) Count trade age less than <2  , Result Sheet2.range("b5")

2) Count Greater than >2 & <=3 , sheet2.range("b6") 
3) Count Greater than >3 , sheet2.range("b7")

[TABLE="width: 256"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD][B]A[/B][/TD]
[TD][B]B[/B][/TD]
[TD][B]C[/B][/TD]
[/TR]
[TR]
[TD]Trade id[/TD]
[TD]Age[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]16174[/TD]
[TD]2[/TD]
[TD]Unmatched[/TD]
[/TR]
[TR]
[TD]16590[/TD]
[TD]3[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]16337[/TD]
[TD]4[/TD]
[TD]Unmatched[/TD]
[/TR]
[TR]
[TD]16844[/TD]
[TD]5[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]16017[/TD]
[TD]2[/TD]
[TD]Unmatched[/TD]
[/TR]
[TR]
[TD]16193[/TD]
[TD]2[/TD]
[TD]Unmatched[/TD]
[/TR]
[TR]
[TD]16345[/TD]
[TD]1[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]16224[/TD]
[TD]0[/TD]
[TD]Unmatched[/TD]
[/TR]
[TR]
[TD]16757[/TD]
[TD]4[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]16415[/TD]
[TD]1[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]16553[/TD]
[TD]1[/TD]
[TD]Unmatched[/TD]
[/TR]
[TR]
[TD]16314[/TD]
[TD]4[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]16096[/TD]
[TD]5[/TD]
[TD]Unmatched[/TD]
[/TR]
[TR]
[TD]16922[/TD]
[TD]1[/TD]
[TD]Unmatched[/TD]
[/TR]
[TR]
[TD]16501[/TD]
[TD]4[/TD]
[TD]Matched[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>
Thanks in advance!

Thanks 
Mallesh.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,221,527
Messages
6,160,342
Members
451,638
Latest member
MyFlower

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