count cell in column for last 5 days with diffrent conditions

manoj_arsul

Board Regular
Joined
Jun 27, 2018
Messages
61
I want program for the below condition.(Last 5 Days Count City wise .) ....( eg .Today is -19th July)


1) Filter to Column "A" Status For Working .
2) Filter to Column "B" City For Pune.
3) Get Till date (Today) Count of column "A" in the cell of table ( Today 19th)
4) Filter Today()-1 & Get date Count of column "A" in the cell of table ( 18th July)
5) Filter Today()-2 & Get date Count of column "A" in the cell of table ( 17th July)
6) Filter Today()-3 & Get date Count of column "A" in the cell of table ( 16th July)
7) Filter Today()-4 & Get date Count of column "A" in the cell of table ( 15th July)

Do the Same condition with other Pending , Pending - Not OK , Waiting

Source Data: -
[TABLE="class: cms_table"]
<tbody>[TR]
[TD="bgcolor: #FFFF00"]Status*[/TD]
[TD="bgcolor: #FFFF00"]City[/TD]
[TD="bgcolor: #FFFF00"]Country[/TD]
[TD="bgcolor: #FFFF00"]Test[/TD]
[TD="bgcolor: #FFFF00"]Date[/TD]
[/TR]
[TR]
[TD]Pending [/TD]
[TD]Pune [/TD]
[TD]India [/TD]
[TD]Ok[/TD]
[TD]19-Jul-18
[/TD]
[/TR]
[TR]
[TD]Pending [/TD]
[TD]Mumbai [/TD]
[TD]India [/TD]
[TD]Ok[/TD]
[TD]17-Jun-18[/TD]
[/TR]
[TR]
[TD]Pending - Not OK [/TD]
[TD]London [/TD]
[TD]England [/TD]
[TD]Not OK[/TD]
[TD]16-May-18[/TD]
[/TR]
[TR]
[TD]Pending - Not OK [/TD]
[TD]Pune [/TD]
[TD]India [/TD]
[TD]Not OK[/TD]
[TD]15-Jul-18[/TD]
[/TR]
[TR]
[TD]Pending [/TD]
[TD]Mumbai [/TD]
[TD]India [/TD]
[TD]Ok[/TD]
[TD]18-Jul-18[/TD]
[/TR]
[TR]
[TD]Pending - Not OK [/TD]
[TD]Mumbai [/TD]
[TD]India [/TD]
[TD]Not OK[/TD]
[TD]19-Jul-18[/TD]
[/TR]
[TR]
[TD]Pending - Not OK [/TD]
[TD]London [/TD]
[TD]England [/TD]
[TD]Not OK[/TD]
[TD]17-Jul-18[/TD]
[/TR]
[TR]
[TD]Pending - Not OK [/TD]
[TD]Pune [/TD]
[TD]India [/TD]
[TD]Not OK[/TD]
[TD]16-Jul-18[/TD]
[/TR]
[TR]
[TD]Waiting [/TD]
[TD]London [/TD]
[TD]England [/TD]
[TD]Ok[/TD]
[TD]15-Feb-18[/TD]
[/TR]
[TR]
[TD]Waiting [/TD]
[TD]Pune [/TD]
[TD]India [/TD]
[TD]Ok[/TD]
[TD]18-Jul-18[/TD]
[/TR]
[TR]
[TD]Waiting [/TD]
[TD]Mumbai [/TD]
[TD]India [/TD]
[TD]Not OK[/TD]
[TD]19-Jul-18[/TD]
[/TR]
[TR]
[TD]Waiting [/TD]
[TD]London [/TD]
[TD]England [/TD]
[TD]Not OK[/TD]
[TD]17-Jul-18[/TD]
[/TR]
[TR]
[TD]Waiting [/TD]
[TD]Pune [/TD]
[TD]India [/TD]
[TD]Ok[/TD]
[TD]16-Jun-18[/TD]
[/TR]
[TR]
[TD]Working [/TD]
[TD]Mumbai [/TD]
[TD]India [/TD]
[TD]Ok[/TD]
[TD]5-Mar-18[/TD]
[/TR]
[TR]
[TD]Working [/TD]
[TD]London [/TD]
[TD]England [/TD]
[TD]Not OK[/TD]
[TD]18-Jul-18[/TD]
[/TR]
[TR]
[TD]Working [/TD]
[TD]Pune [/TD]
[TD]India [/TD]
[TD]Ok[/TD]
[TD]19-Jul-18[/TD]
[/TR]
[TR]
[TD]Working [/TD]
[TD]Pune [/TD]
[TD]India [/TD]
[TD]Ok[/TD]
[TD]17-Mar-18[/TD]
[/TR]
[TR]
[TD]Closed [/TD]
[TD]London [/TD]
[TD]England [/TD]
[TD]Not OK[/TD]
[TD]16-Jul-18[/TD]
[/TR]
[TR]
[TD]Closed [/TD]
[TD]London [/TD]
[TD]England [/TD]
[TD]Not OK[/TD]
[TD]15-Jul-18[/TD]
[/TR]
[TR]
[TD]Closed [/TD]
[TD]Pune [/TD]
[TD]India [/TD]
[TD]Not OK[/TD]
[TD]18-Jul-18[/TD]
[/TR]
[TR]
[TD]Closed [/TD]
[TD]Mumbai [/TD]
[TD]India [/TD]
[TD]Not OK[/TD]
[TD]19-Jul-18[/TD]
[/TR]
[TR]
[TD]Closed [/TD]
[TD]London [/TD]
[TD]England [/TD]
[TD]Ok[/TD]
[TD]17-Jul-18[/TD]
[/TR]
[TR]
[TD]Closed [/TD]
[TD]Pune [/TD]
[TD]India [/TD]
[TD]Ok[/TD]
[TD]16-Jul-18[/TD]
[/TR]
[TR]
[TD]Closed [/TD]
[TD]Mumbai [/TD]
[TD]India [/TD]
[TD]Not OK[/TD]
[TD]15-Jul-18[/TD]
[/TR]
[TR]
[TD]Closed [/TD]
[TD]London [/TD]
[TD]England [/TD]
[TD]Not OK[/TD]
[TD]18-Jul-18[/TD]
[/TR]
</tbody>[/TABLE]



Out Put : [TABLE="class: cms_table"]
<tbody>[TR]
[TD="bgcolor: #FFFF00"]Pune[/TD]
[TD="bgcolor: #DAE3F3"]Working Count [/TD]
[TD="bgcolor: #DAE3F3"]Pending Count[/TD]
[TD="bgcolor: #DAE3F3"]Pending - Not OK[/TD]
[TD="bgcolor: #DAE3F3"]Waiting Count[/TD]
[/TR]
[TR]
[TD="bgcolor: #DAE3F3"]15-Jul-18[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD="bgcolor: #DAE3F3"]16-Jul-18[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD="bgcolor: #DAE3F3"]17-Jul-18[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD="bgcolor: #DAE3F3"]18-Jul-18[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD="bgcolor: #DAE3F3"]19-Jul-18[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]

 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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