You could write some logic for it:
VB Code:
  1. Function CheckColumns(NumColumns As Byte, NumRows As Byte)
  2. Dim I As Byte
  3. Dim J As Byte
  4.  
  5.    For I = 0 To NumColumns
  6.       For J = 0 To NumRows
  7.          'check here
  8.       Next J
  9.    Next I
  10.  
  11. End Function
And then, you could have another function that would shift all of them down, etc.