• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Using the IF formula to display text [SOLVED]

Hello,

I searched through the forum for help with the IF formula displaying text but didn't find anything on this.


I want to display in a cell either,"Credit Card Sales Above 12 Month Ave by X %," or "Credit Card Sales Below 12 Month Ave by X %". I was able to get the formula close in cell G15 of the file below but I'm still missing something in the nested IF formula to enable the formula to show "above" or "below" in the statement. Thank you very much for your help in advance.


https://hotfile.com/dl/229575028/5ecd6e1/Dynamic_Chart_Legends_with_Text.xlsx.html


=IF('Final Graph Unique Key'!H19>'Final Graph Unique Key'!H22,$AK$16,$AK$18)&IF('Final Graph Unique Key'!H19>'Final Graph Unique Key'!H22,"Credit Card Sales Above 12 Month Ave","Credit Card Sales Below 12 Month Ave"&TEXT('Final Graph Unique Key'!H19/'Final Graph Unique Key'!H22-1,"0%"))


Thanks again,

grey kitten
 
I can't access files at my location, but I think (am guessing) the formula needs to be:


=IF('Final Graph Unique Key'!H19>'Final Graph Unique Key'!H22,

$AK$16 & " Credit Card Sales Above 12 Month Ave by ",

$AK$18 & " Credit Card Sales Below 12 Month Ave by ")&

TEXT('Final Graph Unique Key'!H19/'Final Graph Unique Key'!H22-1,"0%")


Now the formula only has to do a single comparison to know which path to take.
 
Hi, greykitten!

I think that's a moved parenthesis issue, surely you received a warning when typing the formula and accepted automatic correction. Try this:

=IF('Final Graph Unique Key'!H19>'Final Graph Unique Key'!H22,$AK$16,$AK$18)&IF('Final Graph Unique Key'!H19>'Final Graph Unique Key'!H22,"Credit Card Sales Above 12 Month Ave","Credit Card Sales Below 12 Month Ave")&TEXT('Final Graph Unique Key'!H19/'Final Graph Unique Key'!H22-1,"0%")

Moved from last position to where bold.

Regards!
 
Hi, greykitten!

Didn't update screen before posting, but I agree with Luke M solution.

Regards!


@Luke M

Hi!

You didn't advise me that you've already posted. Why are you looking over my shoulder then if it isn't to prevent me from overstepping into you? :p

Regards!
 
Back
Top