Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Formula to change font color

I'm trying to write a conditional formula by right-clicking the formula field InsCoGrowth2013-2014 > Font > Color X-2 formula box >

If {@InsCoGrowth2013-2014}<0 Then crRed Else crBlack

The error message I receive 'A string is required here' and the 0 is highlighted.

The formula, InsCoGrowth2013-2014, returns a percentage. 

Thanks soooo much!

replied

What color do you want this formula to return when the other formula returns 'N/A'?

This should work:

If currentfieldvalue = 'N/A' then

some_color_of_your_choice

else

If ToNumber(Trim(Replace(CurrentfieldValue,'%',''))) < 0 then

crRed

else crBlack


-Abhilash

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question