View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default Caculating the remainding amount

"bob__" wrote:
First time poster here

[....]
i have 2 cells left that i need to get
I will call them A and B


So for your edification as a newbie here, it is better to call them what
they are (e.g. A1 and B1).

And it is prudent to show exactly the formulas or constant that each cell
contains in order to minimize ambiguities that delay your getting a usable
answer.

Bob wrote:
B always starts with 3000 (could be 4000 or anything
else later on, but for all purposes 3000 is fine)

[....]
If A is positive, nothing would be done, but if A
was -345.32 for example, that exact amount is taken
from B


Perhaps the following in B1:

=MIN(3000,3000+A1)

or

=MAX(0,MIN(3000,3000+A1))

The difference depends on whether or not you want to allow B1 to go negative
(A1 < - 3000).