Given an equilateral triangle with sidelength $k$ cm. With lines parallel to it's sides, we split it into $k^2$ small equilateral  triangles with sidelength $1$ cm. This way, a triangular grid is created. In every small triangle of sidelength $1$ cm,  we place exactly one integer from $1$ to $k^2$ (included), such that there are no such triangles having the same numbers. With vertices the points of the grid, regular hexagons are defined of sidelengths $1$ cm. We shall name as [i]value [/i] of the hexagon, the sum of the numbers that lie on the $6$ small equilateral triangles that the hexagon consists of . Find (in terms of the integer $k>4$) the maximum and the minimum value of the sum of the values of all hexagons .
To solve this problem, we need to analyze the distribution of the small equilateral triangles within the larger equilateral triangle and how they contribute to the values of the hexagons formed by the grid.

1. **Understanding the Grid and Hexagons:**
   - The large equilateral triangle has a side length of \( k \) cm.
   - It is divided into \( k^2 \) small equilateral triangles, each with a side length of 1 cm.
   - Each small triangle is uniquely numbered from 1 to \( k^2 \).

2. **Hexagon Formation:**
   - Each hexagon of side length 1 cm is formed by 6 small equilateral triangles.
   - The hexagons are defined by the vertices of the grid.

3. **Counting the Small Triangles in Hexagons:**
   - A small triangle can be part of 0, 1, 2, or 3 hexagons depending on its position within the large triangle.
   - Triangles on the edges and corners of the large triangle are part of fewer hexagons.

4. **Distribution of Small Triangles:**
   - **0 Hexagons:** 3 triangles (one at each corner).
   - **1 Hexagon:** \( 3(k-1) \) triangles (along the edges, excluding corners).
   - **2 Hexagons:** \( 3(k-2) \) triangles (next to the edge triangles).
   - **3 Hexagons:** \( (k-2)^2 \) triangles (interior triangles).

5. **Sum of Values in Hexagons:**
   - To find the maximum and minimum values of the sum of the values of all hexagons, we need to consider the placement of the numbers 1 to \( k^2 \).

6. **Minimizing the Sum:**
   - Place the largest numbers in the triangles that are part of fewer hexagons.
   - Place the smallest numbers in the triangles that are part of more hexagons.

7. **Maximizing the Sum:**
   - Place the smallest numbers in the triangles that are part of fewer hexagons.
   - Place the largest numbers in the triangles that are part of more hexagons.

8. **Calculating the Sum:**
   - The total sum of numbers from 1 to \( k^2 \) is given by the formula for the sum of the first \( n \) natural numbers:
     \[
     S = \frac{k^2 (k^2 + 1)}{2}
     \]

9. **Hexagon Contributions:**
   - Each small triangle contributes to the sum of the hexagons it is part of.
   - The total contribution of all small triangles to the hexagons is:
     \[
     3 \times 0 + 3(k-1) \times 1 + 3(k-2) \times 2 + (k-2)^2 \times 3
     \]
   - Simplifying this, we get:
     \[
     3(k-1) + 6(k-2) + 3(k-2)^2
     \]
   - This simplifies to:
     \[
     3k - 3 + 6k - 12 + 3k^2 - 12k + 12 = 3k^2 - 3k - 3
     \]

10. **Final Calculation:**
    - The sum of the values of all hexagons is:
      \[
      \text{Sum of all hexagons} = \frac{k^2 (k^2 + 1)}{2} \times (3k^2 - 3k - 3)
      \]

The final answer is \(\boxed{\frac{k^2 (k^2 + 1)}{2} \times (3k^2 - 3k - 3)}\).