I need an answer display in one cell if (=), but another if (-)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Excel spreadsheet where there is a "Charges" column and a "Credits"
column. I am multiplying the per diem by the days. If it's a positive
number I want the value in the "Charges" column. If it's a negative value I
want it in the "Credits" column. Can anyone suggest a formula to do this?

COUNTY 365 BASE $5,452.78 Per Diem: $14.94
FROM 07/01/08 TO 08/30/07 Days: (306) ($4,571.37)
Thank you!
 
A formula cannot "push" values to another cell, so in the Charges
column use this formula:

=MAX(per_diem*days,0)

In the Credits column use this:

=MIN(per_diem*days,0)

Substitute the appropriate cell references and copy down as required.

Hope this helps.

Pete
 
Thank you very much! That did the trick :o)

Pete_UK said:
A formula cannot "push" values to another cell, so in the Charges
column use this formula:

=MAX(per_diem*days,0)

In the Credits column use this:

=MIN(per_diem*days,0)

Substitute the appropriate cell references and copy down as required.

Hope this helps.

Pete
 
Back
Top