This topic is 5702 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

• Newbies

I have a calculation field which is a SUM of several other fields (all numbers). I would like to compare this calculation field to another number field, with the result of either GREEN or RED number, depending on whether or not this field has a higher numerical value.

In other words, if field A is smaller then field B, I want the field A be in RED, etc.

How would you write such a calculation and how can it be added to the existing calculation ? Many thanks !

##### Share on other sites

Assuming that field A is the calc field that sums up your other numbers, and Field B is the field to compare the value to, and R, S, T are the fields which values are bering summed together, then the calculation for field A is:

Let ( x = r+s+t;

Case ( x < B ; TextColor ( x ; RGB ( 255 ; 0 ; 0 ) ); TextColor ( x ; RGB ( 0 ; 255 ; 0 ) ) )

)

##### Share on other sites

This topic is 5702 days old. Please don't post here. Open a new topic instead.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account