Jump to content
Server Maintenance This Week. ×

Done in by simple calculation


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

Recommended Posts

This will probably be another 'duh!' for me, but I can't get a conditional formula to work.

I am trying to get a value to appear in red when it is out of range. Yes, the values 'not between' works dandy. This time, however, the range depends upon the gender of the person. So here is the formula I wrote:

Case (

Gender__lxt = "Male " and RBC__lxn > 5.9;

TextColor ( RBC__lxn ; RGB ( 237 ; 31 ; 36 ) );

Gender__lxt = "Female " and RBC__lxn > 5.1;

TextColor ( RBC__lxn ; RGB ( 237 ; 31 ; 36 ) );

Gender__lxt = "Male " and RBC__lxn < 4.5;

TextColor ( RBC__lxn ; RGB ( 237 ; 31 ; 36 ) );

Gender__lxt = "Female " and RBC__lxn < 4.1;

TextColor ( RBC__lxn ; RGB ( 237 ; 31 ; 36 ) );

TextColor ( RBC__lxn ; RGB ( 7 ; 4 ; 4 ) )

)

What I thought this said was, if conditions are #1, print red; if not, going on to conditions #2, if true, print red, if not going on to condition # 3, if true, print red, if not going on to conditions #4, print red, and if any not true, then print in black.

What did I do wrong this time?

Thanks for reading about, and possibly helping, my dilemma!

Edited by Guest
Link to comment
Share on other sites

1. Where is the "print in black" part?

2. Why is there a trailing space in "Male " and "Female "?

3. You could shorten your logic to: if condition #1 is true OR condition #2 is true OR condition # 3 is true OR condition #4 is true, print in red - otherwise print in black.

Link to comment
Share on other sites

Thanks. The original had the correct color numbers. I just removed the extra space, and that didn't help any. I have actually cut the formula to just the first condition (record is a male) and put various values in the field, and they all come out red. So is something wrong with the and statement?

Link to comment
Share on other sites

This topic is 5411 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

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.