Yes, Excel can perform the calculations, but you need to build the algorithm (ie logic) behind it. So if you wanted to build 35 boxes with 10 articles per box, min 5 different colors and you have 1000 colors you could build a list of all the colors and associate them with a number (1 to 1000). You could then use a formula like =rand()*1000 in number format rounded to 0 decimal places. copy down 10 cells, then perform a copy/paste special values. From here in the next column you can use a vlookup to lookup what color from your color list is associated with these 10 random pics. Repeat 35 times.

From here you can build your algorithm. In this case we can skip this step because using 10 random numbers to a 3 places in Excel will always give you at least 5 that are unique.

If you need to build some complex rules sets, such as make sure customer X does not receive the more than 6 duplicates in 5 orders, or tie this into an inventory system, then Excel could be very useful to you. If your example is the extent of it, I personally would just run the math =10/5 is 2 and so, grab 2 articles out of 5 random containers and let my brain just pick which colors at random.