Need Help

nbkqsj7

New Member
Joined
Oct 26, 2020
Messages
20
Office Version
  1. 2010
Platform
  1. Windows
Hello All,

I am looking for VBA to count my data on following conditions

The value should reflect in Cell O2 (Count if in Column M date is less than or Equal to today Column D is not equal to Validation )
The value should reflect in Cell P2 (Count if in Column M date is less than or Equal to today and Colum B is not blank and Column D is not equal to Validation )
The value should reflect in Cell Q2 (Count if in Column M date is less than or Equal to today and Colum B is blank and Column D is not equal to Validation )

The value should reflect in Cell O3 (Count if in Column M date is Equal to Tomorrow ( Excluding Saturday Sunday) Column D is not equal to Validation )
The value should reflect in Cell P3 (Count if in Column M date is Equal to Tomorrow ( Excluding Saturday Sunday) Column D is not equal to Validation and Colum B is not blank )
The value should reflect in Cell Q3 (Count if in Column M date is Equal to Tomorrow ( Excluding Saturday Sunday) and Column D is not equal to Validation and Colum B is blank )

The value should reflect in Cell O4 (Count if in Column M date is Equal to Tomorrow+1 ( Excluding Saturday Sunday) Column D is not equal to Validation )
The value should reflect in Cell P4 (Count if in Column M date is Equal to Tomorrow +1 ( Excluding Saturday Sunday) Column D is not equal to Validation and Colum B is not blank )
The value should reflect in Cell Q4 (Count if in Column M date is Equal to Tomorrow +1 ( Excluding Saturday Sunday) and Column D is not equal to Validation and Colum B is blank )

I am attaching a image to get better help..

Thanks in advance
 

Attachments

  • VBA.JPG
    VBA.JPG
    111.6 KB · Views: 11

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
O2:
Code:
=COUNTIFS($M$2:$M$16,"<=" & TODAY()+ROW(1:1)-1,$D$2:$D$16,"<>Validation")
P2:
Code:
=COUNTIFS($M$2:$M$16,"<=" & TODAY()+ROW(1:1)-1,$D$2:$D$16,"<>Validation",$B$2:$B$16,"<>")
Q2:
=O2-P2
Drag down
 
Upvote 0
O2:
Code:
=COUNTIFS($M$2:$M$16,"<=" & TODAY()+ROW(1:1)-1,$D$2:$D$16,"<>Validation")
P2:
Code:
=COUNTIFS($M$2:$M$16,"<=" & TODAY()+ROW(1:1)-1,$D$2:$D$16,"<>Validation",$B$2:$B$16,"<>")
Q2:
=O2-P2
Drag down
Thank you for your help.. trying to implement
 
Upvote 0

Forum statistics

Threads
1,214,872
Messages
6,122,026
Members
449,061
Latest member
TheRealJoaquin

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