Rainesky

There will be a number of solutions to your question, do you have more constraints like supply or sales constraints?

You could make up a large table of Lengths and Multiples of to arrive at the 96' result

If you have enough constraints you could try Solver

Solver will automatically go through a number of scenarios and look to maximimise, minimise etc results based on dependancies that you setup.

Solver is not installed in Excel 2007 by Default

Goto Excel Options, Addins Select "Manage Excel Addins" and Check Solver

The Solver Tab will now show up on the Data Tab

Solver allows you to goal seek a result (in your case =96') subject to applying a number of constraints.

In your case and not knowing what A, B, C & D are, but a Constraint maybe

A + B + C + D >= 96

A + B + C + D <= 98

A>0, B>0, C>0, D>0

A,B,C,D < 24

A,B,C & D must be integers

etc

When applying constraints and running solutions remember that excel may find solutions you don't expect eg: B = -10, This means that you need to add adequate constraints to ensure you get the answers you want ie: A>0 & B>0 & C>0 & D>0