Hello problem solvers,
I'm not exactly after the code to solve this problem more the logic on how it should be solved.
I enjoy trying to write the code to solve the problems this one has just had me stumped for a while.
Any ideas greatly appreciated. I hope there is someone out there who enjoys this sort of thing.

The Problem:

I have an excel sheet where you can enter different volumes of liquid to be stored in Silos.
eg
Water 12,000 Litres
Oil 9,000 Litres
Milk 23,000 Litres
There can be any number of different liquids the sheets allow you to add more.

I want the code to work out how to divide these liquids into a number of silos that can have different storage volumes.
I will be adding/removing and changing these silos so I need the code to work regardless of what silos are there.
I want the code to try split the liquids as little as possible so I'd prefer it in 1 silo rather than 2, 2 silos rather than 3.
If a liquid must be split I'd prefer it to be in the 2 smallest silos it will fit in. Then if it does fit in 2 silos, split it into the 3 smallest silos. and so on.

Using previous volumes for example
Silos available
3,000L Empty
7,000L Milk(6000L)
10,000L oil (9000L)
15,000L Water (12,000L)
15,000L Empty
17,000L Milk (17,000L)

Anymore questions feel free to ask I hope I have explained the problem well enough.

My solution to this problem was to loop through the smallest to largest liquid so small volumes would go in the smallest silos
I would then loop through the storage silos from smallest to largest checking if it would fit. If it did fit I'd mark the silo as used and move on. If it didn't fit I would loop through again starting with the smallest available and then adding on another silos volume from smallest to largest (2 nested loops).
If that didn't fit I'd then do 3 nested loops.
This didn't scale very well once I was going past splitting 6 times the code got too long and I wanted to rewrite it because the problem was only going to get bigger the more things got added.

I have tried to work out how to solve it using a recursive solution but I can't work it out because I want to exhaust all the 1 silo combinations then all 2 silo combinations then all 3 silo combos etc.

Thanks to anyone who read through this. I feel I just need a nudge in the right direction.