From: Jackie Morin on
How do I have a cell look at another cell and make a calculation. For example:

A B C
(197) 3500 500

If column A is less than B then have the calculation of the amount of (C) it
would take to bring it to positive standing. The answer should be 4000. That
is (8) lots of 500 to make the amount 3803. That is C times (8) minus 197. If
(A) was 3501 then I would have a return value of 0. I would not need to
replenish.
From: tompl on
Assuming your numbers are in cells A1 B1 and C1 then put this formula in cell
D1:

=IF(A1<B1,(ROUNDUP((B1-A1)/C1,0))*C1,0)

Tom

"Jackie Morin" wrote:

> How do I have a cell look at another cell and make a calculation. For example:
>
> A B C
> (197) 3500 500
>
> If column A is less than B then have the calculation of the amount of (C) it
> would take to bring it to positive standing. The answer should be 4000. That
> is (8) lots of 500 to make the amount 3803. That is C times (8) minus 197. If
> (A) was 3501 then I would have a return value of 0. I would not need to
> replenish.
From: Bernard Liengme on
Not sure I really understand the problem but does this help:
=IF(A1<B1,CEILING((B1-A1),500),0)
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Jackie Morin" <JackieMorin(a)discussions.microsoft.com> wrote in message
news:879D28AF-CB8C-41B6-9D9D-C19E6A416D9F(a)microsoft.com...
> How do I have a cell look at another cell and make a calculation. For
> example:
>
> A B C
> (197) 3500 500
>
> If column A is less than B then have the calculation of the amount of (C)
> it
> would take to bring it to positive standing. The answer should be 4000.
> That
> is (8) lots of 500 to make the amount 3803. That is C times (8) minus 197.
> If
> (A) was 3501 then I would have a return value of 0. I would not need to
> replenish.

From: Jackie Morin on
That works perfectly. Thanks so much for your help.

"tompl" wrote:

> Assuming your numbers are in cells A1 B1 and C1 then put this formula in cell
> D1:
>
> =IF(A1<B1,(ROUNDUP((B1-A1)/C1,0))*C1,0)
>
> Tom
>
> "Jackie Morin" wrote:
>
> > How do I have a cell look at another cell and make a calculation. For example:
> >
> > A B C
> > (197) 3500 500
> >
> > If column A is less than B then have the calculation of the amount of (C) it
> > would take to bring it to positive standing. The answer should be 4000. That
> > is (8) lots of 500 to make the amount 3803. That is C times (8) minus 197. If
> > (A) was 3501 then I would have a return value of 0. I would not need to
> > replenish.