Being trawling the web and tbh the web has confused me more

I am wanting to do permutations in Excel - initially I was going to go about it in one way but realised I would could end up with Billions of permutations.

I have realised since I can make a smaller data subset but then I need to kind of do the following I realise this is going to be a e.g. 6*5*4*3*2*1 type sort

But I want to do exclusions & Recalc’s and not have a full list of pemutations

Example

…Col A----Col B-----Col C----Col D

- Item1 - 30mins - Item2 - Recalculated figure
- Item2 - 25mins - Item1 - Recalculated figure
- Item3 - 45mins - Item3 - recalculated figure
- Item4 - 30mins - Item4 - Recalculated figure

…Total - 130 --------------- recalculated figure

So Basically it would be all purmutation of column A & Column B is calculated value from another lookup.

In the background it would do its next permutation save to an array, recalculate the B column data from a lookup but not necesserily update excel table in col C & D.

If the recalculated total for the next permutation is less than that for sum of Column B total it would update Column C & D with the relivent data.

So I need to set the size of the Dataset so it knows how many line of data to use, do the permutations grab the recalculated figure if figure is less update table if not skip and do next permutation

Head fried :whiteflag: any help pointers much appreciated.

/Paul.

Basically this is a time optimisation type calculation to get to the lowest possible time.