Hi All,
I had some great help creating the attached sheet which essentially lists the amount of unique values within a field and then counts whether or not that value occurs in the next row.
I've been using it for model i use to calculate how long a vehicle parks in an area. Attached is a formula based approach which outlines what i'm using.
I know its formula based rather than VBA so it is a little slow but it will do the job for what im intending.
Essentially my issue are as follows;
to
Im not sure where i am going wrong.
The other issue i face is that when the parking pattern reads 111101111 (where 1 means a vehicle was parking in the space and 0 means there wasnt one) it should record this as 2 instances of a vehicle parking for a 2 hr period (each character in the set equals 30min). I have provided comments in the sheet to highlight this.
Hope you can let me know where i have gone wrong so I can learn from this. I did initially have some help setting up the formulas by some great members on here so while i have an understanding of how the formulas work I am not 100% sure on what exactly is going on.
I had some great help creating the attached sheet which essentially lists the amount of unique values within a field and then counts whether or not that value occurs in the next row.
I've been using it for model i use to calculate how long a vehicle parks in an area. Attached is a formula based approach which outlines what i'm using.
I know its formula based rather than VBA so it is a little slow but it will do the job for what im intending.
Essentially my issue are as follows;
- at the moment i cannot expand the rows any further to increase the time period (number of rows) that the sheet calculates. Currently it counts up to 9 rows (peach area in attached sheet). I need it to count up to 16 (that is the time period extends from 9am to 5pm not 9am to 12.30pm). I get a #num error when i try to change the code from
Code:
DEC2BIN(SUM(TEXT(MMULT(TRANSPOSE(ROW(Data)^0), (Data=$O5)*(DataColors=P$1)),"1;;0;")*{256,128,64,32,16,8,4,2,1}),9)
to
Code:
=DEC2BIN(SUM(TEXT(MMULT(TRANSPOSE(ROW(Data)^0), (Data=$O5)*(DataColors=P$1)),"1;;0;")*{512,256,128,64,32,16,8,4,2,1}),10)
Im not sure where i am going wrong.
The other issue i face is that when the parking pattern reads 111101111 (where 1 means a vehicle was parking in the space and 0 means there wasnt one) it should record this as 2 instances of a vehicle parking for a 2 hr period (each character in the set equals 30min). I have provided comments in the sheet to highlight this.
Hope you can let me know where i have gone wrong so I can learn from this. I did initially have some help setting up the formulas by some great members on here so while i have an understanding of how the formulas work I am not 100% sure on what exactly is going on.