Dynamic Array needed

Stephen_IV

Well-known Member
Joined
Mar 17, 2003
Messages
1,168
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have VBA for this but I am looking to solve this with your help with a Dynamic Array. I am looking for a Dynamic array of employees and schools. Each x represents 0.2 for a day. Sometimes a person will be at multiple schools in a day. So if the employee goes to 2 schools in a day then it would be 0.1 for the first school and 0.1 for the second school.

For employee 111
IDLast NameFirst NameSchoolMTWTHF
111​
AAAAWashingtonxx
111​
AAAALincolnxxxxx

In this example 111 at School Washington Works W and TH. Wednesday is also at Lincoln and Thursday at Lincoln so 0.1 for W and 0.1 for TH = 0.2.
At Lincoln M 0.2, T 0.2, W 0.1, TH 0.1, F 0.2 = 0.8

Book1
ABCDEFGHIJ
1IDLast NameFirst NameSchoolMTWTHF
2111AAAAWashingtonxx0.2
3111AAAALincolnxxxxx0.8
4222BBBBFordx0.1
5222BBBBWashingtonxxxxx0.9
6333CCCCHardingxxxxx1
7444DDDDCentralxxx0.233333333
8444DDDDLincolnxxxxx0.633333333
9444DDDDFordxx0.133333333
10555EEEEJohnsonxxx0.4
11555EEEEKennedyxxxx0.4
12555EEEERooseveltxx0.2
Sheet1
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

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