Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If-Then-Else returning Zero 1

Status
Not open for further replies.

BHERNANDEZ

Technical User
Mar 4, 2003
24
US
Help the slow-witted, please!

I have two fields in the same If-Then-Else Formula. The Order Type field has only two answers - C or O. If the Order Type is 'C', then the sales amount is a negative number. Vice versa for the 'O'. My formula has no errors, but returns a sales amount of 0.00. What can I do to fix this?

Formula:

If {Order Type} = "C" then
If {Order Type} = "O" then
{Sls Amt}
Else {sls amt}*-1

Bridget
 
If you know that Order Type will always be C or O, then try:

If {Order Type} = "C" then
{sls amt}*-1
Else
{Sls Amt}

-dave
 
Dave,

Thanks!!! I had that originally, but my last field was beside the Else. The formula was correct, but I received a Bad Formula Result error when I tried to preview my report. Your idea worked wonderfully and now I can see my figures!!! Thanks again!

Bridget
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top