Caculating the remainding amount

B

bob__

Hi everyone.

First time poster here, but i have read through alot of threads and
cant seem to find an answer that can help me, so i thought i join up an
become an active member :)

Ill cut straight to the point

I am at an intermediate level with excel, and i was wondering if m
following problem can be solved, ill give a basic run-down, and i
anymore detail is required please let me know

After a few caculations etc etc i have 2 cells left that i need to ge
the following to happen

I will call them A and B

A has an amount which could be negative or positive.
B always starts with 3000 (could be 4000 or anything else later on, bu
for all purposes 3000 is fine)

Is there a way so that if A is ever a negative, i can have an amoun
taken from B to bring A back to zero.

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

That is the most direct description i can give, but if more info i
reequired just let me know, because there possibly might be a way aroun
this with another column or two to bypass this

And help would be great

Thanks in advanc
 
J

joeu2004

bob__ said:
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.
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).
 
S

Stan Brown

A has an amount which could be negative or positive.
B always starts with 3000 (could be 4000 or anything else later on, but
for all purposes 3000 is fine)

Is there a way so that if A is ever a negative, i can have an amount
taken from B to bring A back to zero.

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

In B1:

=3000+min(0,A1)

If A1 is negative, min(0,A1) is A1, and that negative amount will be
added to B1, or in other words B1 will be reduced.

If A1 is positive (or 0), min(0,A1) is 0, an dB1 will be 3000.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top