The following diagram shows a grid of $36$ cells. Find the number of rectangles pictured in the diagram that contain at least three cells of the grid.
[img]https://cdn.artofproblemsolving.com/attachments/a/4/e9ba3a35204ec68c17a364ebf92cc107eb4d7a.png[/img]
1. **Calculate the total number of rectangles in the grid:**

   The grid is a $6 \times 6$ grid, which means it has 7 horizontal and 7 vertical lines. The number of ways to choose 2 horizontal lines from 7 is $\binom{7}{2}$, and the number of ways to choose 2 vertical lines from 7 is also $\binom{7}{2}$. Therefore, the total number of rectangles is:
   \[
   \binom{7}{2} \times \binom{7}{2} = 21 \times 21 = 441
   \]

2. **Subtract the number of rectangles that do not meet the criteria:**

   We need to subtract the rectangles that contain fewer than 3 cells. These are the $1 \times 1$ and $1 \times 2$ rectangles.

   - **Number of $1 \times 1$ rectangles:**
     Each cell in the grid is a $1 \times 1$ rectangle. There are $6 \times 6 = 36$ such rectangles.

   - **Number of $1 \times 2$ rectangles:**
     A $1 \times 2$ rectangle spans 1 row and 2 columns. There are 6 rows and 5 possible pairs of columns in each row, so there are:
     \[
     6 \times 5 = 30
     \]
     Similarly, a $2 \times 1$ rectangle spans 2 rows and 1 column. There are 5 possible pairs of rows and 6 columns, so there are:
     \[
     5 \times 6 = 30
     \]
     Therefore, the total number of $1 \times 2$ and $2 \times 1$ rectangles is:
     \[
     30 + 30 = 60
     \]

3. **Subtract the rectangles that do not meet the criteria from the total number of rectangles:**

   The total number of rectangles that contain fewer than 3 cells is:
   \[
   36 + 60 = 96
   \]
   Therefore, the number of rectangles that contain at least 3 cells is:
   \[
   441 - 96 = 345
   \]

The final answer is $\boxed{345}$