Calculating the size of uniform cabinet doors on two walls I know using this board for this problem is overkill, but I'm struggling with something that I know should be simple.
I'm building kitchen cabinets on two different walls. I'm going to buy the doors for these cabinets from a manufacturer in bulk, and all cabinet doors I buy will be the exact same width, which I can specify. The width of the doors I'm ordering is what I'm trying to calculate.
One wall of the kitchen is 15' long, and one is 9' long. (The walls don't connect)
I want the maximum number of cabinet doors possible on each wall. The doors must all be the same width because I'm buying in bulk, but also conform to a minimum width and maximum width that a cabinet door must have to be functional.
And so I need an equation that let's me input:

*

*A base-width (BW) for cabinet doors.

*A maximum width (MW) for cabinet doors.

*The size of wall A (WA)

*The size of wall B (WB)

And outputs the width of cabinet doors I should be ordering. So that I can have the maximum amount of doors possible on each wall, while ensuring all doors are the same width, but also within the min/max width range for cabinet doors.

If you measure the width in inches, a width of $w$ will give you $\frac {180}w$ doors along the $15'$ wall and $\frac {108}w$ doors along the $9'$ wall.  If the fractions do not come out even, throw away any remainder.  To get the most doors you want to choose $w$ as small as possible.  This will make the cabinets quite narrow.  As you talk of a minimum width, you can just use that.  It will give you the most doors.
