Your problem is more like a formula issue than programming
Solution is along the llines of
A B C D E F
Qty Price Total Max Cash Max Cap Qty to Buy
12 100 =A*B 1,000 50 =MIN(A,INT(D/B),E)
Row numbers missing from formulas
If you enter more in column A than you can afford or than you can carry
column F will show the limiting number
Nick
"Sabrick" wrote:
I have a business where I buy things are one place and sell them at
another, I am limited by two things:
1. my maximum amount of cash to pay for something before i resell it:
(Max Cash)
2. the capcity of my truck (Max Capcity)
I have a "Total" field that uses the "price" and "quantity" fields to
sum up a total (price*quantity=Total). I also have a "max capcity" and
a "max cash" field which shows the maxium "quantity" I can fit into a
truck and the max cash I can spend at one time.
so...
I want my quantity field to automatically adjust when it is higher
than my max capcity field so I don't buy more than I can haul.
ALSO
I want my quantity field to automatically adjust when the TOTAL field
is higher than my "Max Cash" rate so i don't attempt to buy more than I
can afford
thank you for even attempting this, seems like it is impossible based
on my limited knowledge
--
Sabrick
------------------------------------------------------------------------
Sabrick's Profile: http://www.excelforum.com/member.php...o&userid=32385
View this thread: http://www.excelforum.com/showthread...hreadid=521483