Excel VBA Multiple Criteria Loop problem

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I cannot use your link due to corporate security ... describe your problem and requirements.
 
Upvote 0
Hi Thanks for reply ..inconvenience regretted!!

I have a dataset wherein I have date ranges from 1st to 31th of month for and date instances are repeating for many employees. so here is an example
Category 1
Date EmpId Emp_Name Criteria Sub Category1 Criteria Sub Category2 Criteria Sub Category3 Criteria Sub Category4
04/01/11 000123456 Employee Temp 200 100 200 150
04/02/11 000123456 Employee Temp 150 50 100 150
04/03/11 000123456 Employee Temp 200 150 100 200
04/04/11 000123456 Employee Temp 200 150 200 200
04/05/11 000123456 Employee Temp 150 100 150 150
04/06/11 000123456 Employee Temp 200 100 50 50
04/07/11 000123456 Employee Temp 150 150 100 150
04/08/11 000123456 Employee Temp 100 150 150 150
04/09/11 000123456 Employee Temp 150 150 150 150
04/10/11 000123456 Employee Temp 150 150 150 150
04/11/11 000123456 Employee Temp 100 150 150 150
04/12/11 000123456 Employee Temp 100 150 150
04/13/11 000123456 Employee Temp 50 50 150 150



something same for other 10 employees

Now I need a loop to get the data date wise (date range say from 1st to 10th) or employee wise MTD (date range would be applicable say 1st to 10th MTD Scores for Distinct employees)..
Date Wise
Category 1
Date Empid Name Criteria Category Criteria Category1 Criteria Category2
1-Jan 000123456 Employee Temp 162.5 150 150
2-Jan 000123456 Employee Temp 112.5 100 125
3-Jan 000123456 Employee Temp 162.5 150 150
4-Jan 000123456 Employee Temp 187.5 183.3333333 200
1-Jan 000671111 Employee Temp1 And so on And so on And so on
2-Jan 000671111 Employee Temp1 And so on And so on And so on
3-Jan 000671111 Employee Temp1 And so on And so on And so on
4-Jan 000671111 Employee Temp1 And so on And so on And so on

MTD MTD Scores for ALL Employees (Date range is 1st to nth of month)

Empid Name Criteria Category1 Criteria Category2 Criteria Category3
000123456 Employee Temp MTD Average MTD Average MTD Average
000671111 Employee Temp1 MTD Average MTD Average MTD Average
000654321 Employee Temp2 MTD Average MTD Average MTD Average
000672717 Employee Temp3 MTD Average MTD Average MTD Average


Hope you get it..

Thanks Again

Dev
 
Upvote 0
Can I ask what you are going to be doing with the date wise subset? ( i.e. why aren't you just doing an Autofilter on the required dates ... that's what you'd do if you simply wanted to view a subset )

And for MTD, have you considered simply doing a pivottable for this?
 
Upvote 0
Hi,

Datewise is a requirement of my Goal Sheet where I want to see data for my employees Date wise (for analysis) what they achieved in all categories.. and hmmm ... Pivot table, I could do that but I will use the information somewhere else using loop.. and I am not sure If I can pick required data from Pivot...

and this is a project where I have so many modules and using pivot in between can hamper my code speed.. :(


Thanks
 
Upvote 0
I have done it!! way is altogether different from Loops.. I used ODBC Connection and ran a SQL query!! :D

Thanks for your help


Hi,

Datewise is a requirement of my Goal Sheet where I want to see data for my employees Date wise (for analysis) what they achieved in all categories.. and hmmm ... Pivot table, I could do that but I will use the information somewhere else using loop.. and I am not sure If I can pick required data from Pivot...

and this is a project where I have so many modules and using pivot in between can hamper my code speed.. :(


Thanks
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

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