How do I set up formulas with 'if'?

  • Thread starter How to use 'IF' in a formula.
  • Start date
H

How to use 'IF' in a formula.

I am creating a chart that calculates. However, when a calculation comes to
a negative amount, I want that amount automatically placed in another cell.
How do I do this? I know I should type something that includes an 'IF', I
just don't know how to word it exactly.
 
K

Ken Wright

In the cell that currently contains your formula, put:-

=MAX(0,your_formula)

In the cell you want the negative value to go to:-

=MIN(0,your_formula)
 
G

Gord Dibben

Formulas cannot place data in another cell.

They can return results only to the cell in which they are written.

The "other" cell must have a formula to check the first cell's value and if
negative, reurn a result.

A1 has a formula that returns a positive or negative result.

In B1 enter =IF(A1<0,A1,"positive") which says if A1 is negative show
result, if A1 is 0 or positive show "positive".


Gord Dibben Excel MVP
 

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