count cell in column for last 5 days with diffrent conditions


New Member
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: -
Pending Pune India Ok19-Jul-18
Pending Mumbai India Ok17-Jun-18
Pending - Not OK London England Not OK16-May-18
Pending - Not OK Pune India Not OK15-Jul-18
Pending Mumbai India Ok18-Jul-18
Pending - Not OK Mumbai India Not OK19-Jul-18
Pending - Not OK London England Not OK17-Jul-18
Pending - Not OK Pune India Not OK16-Jul-18
Waiting London England Ok15-Feb-18
Waiting Pune India Ok18-Jul-18
Waiting Mumbai India Not OK19-Jul-18
Waiting London England Not OK17-Jul-18
Waiting Pune India Ok16-Jun-18
Working Mumbai India Ok5-Mar-18
Working London England Not OK18-Jul-18
Working Pune India Ok19-Jul-18
Working Pune India Ok17-Mar-18
Closed London England Not OK16-Jul-18
Closed London England Not OK15-Jul-18
Closed Pune India Not OK18-Jul-18
Closed Mumbai India Not OK19-Jul-18
Closed London England Ok17-Jul-18
Closed Pune India Ok16-Jul-18
Closed Mumbai India Not OK15-Jul-18
Closed London England Not OK18-Jul-18


Out Put :
PuneWorking Count Pending CountPending - Not OKWaiting Count



Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Macro to copy values across rows and transposing them and add the user id
    [FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT][FONT=Calibri][SIZE=3][COLOR=#000000]Hi,[/COLOR][/SIZE][/FONT] [FONT=Times New...