Note:I do not guarantee this algorithm is perfect, I gave it a shot but there is still some work for you to do in terms of testing it and integrating it with your code. I was not sure whether to post it, but I know what it's like to be stuck, and I thought this would help you get 'unstuck'. Good luck.

'START CODE

Const upperRow = 20

Const upperCol = 7

Const cols = 2

Dim arrLogcolsonHrs

ReDim arrLogonHrs(upperRow,upper

'Zero Fill Array

For i = LBound(arrLogonHrs) to UBound(arrLogonHrs)

For j = LBound(arrLogonHrs, cols) to UBound(arrLogonHrs, cols)

arrLogonHrs(i,j) = 0

arrLogonHrs(i,(i mod UBound(arrLogonHrs, cols))) = 1 'this is just to fill with test data - remove this line

Next

Next

MsgBox "This is the array we will shift" & vbcrlf & PrintArray(arrLogonHrs)

MsgBox "This is the array shifted" & vbcrlf & PrintArray(ShiftArray(cols

Function ShiftArray(shift, theArray())

Dim tmp

ReDim tmp(upperRow,upperCol)

Dim tmpRow

Dim tmpCol

If shift > 0 Then

If Int(shift / (UBound(tmp, cols) + 1)) > 1 then

tmpRow = Int(shift / (UBound(tmp, cols) + 1)) - 1

else

tmpRow = 0

end if

tmpCol = shift mod (UBound(tmp, cols) + 1)

For i = LBound(tmp) to UBound(tmp)

For j = 0 to UBound(tmp, cols)

If tmpCol mod (UBound(tmp, cols) + 1) = 0 Then

tmpRow = tmpRow + 1

End If

tmp(tmpRow mod (UBound(tmp) + 1), tmpCol mod (UBound(tmp, cols) + 1)) = theArray(i, j)

tmpCol = tmpCol + 1

Next

Next

ElseIf shift = 0 Then

ShiftArray = theArray

End If

ShiftArray = tmp

End Function

Function PrintArray(theArray)

For i = LBound(theArray) to UBound(theArray)

For j = LBound(theArray, cols) to UBound(theArray, cols)

s = s & theArray(i,j)

Next

s = s & vbcrlf

Next

PrintArray = s

End Function

'END CODE