English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i have an if statement id like to write in excel that does the following.

if(a1>a2) i want it to display "BEHIND" in bold red followed by the value of a1-a2

else (a1
could you please tell me how to do this?

2007-02-05 06:21:26 · 5 answers · asked by sean_mchugh6 3 in Science & Mathematics Mathematics

5 answers

You will have to combine the answers already given. You will have to do the calculation in a work cell, then do conditional formatting to choose the color, then put an if statement to choose the word and the value.

2007-02-05 06:38:12 · answer #1 · answered by Mike1942f 7 · 1 0

=If (a1>a2, then concatenate("Behind ",a1-a2), concatenate ("Ahead ",a2-a1))

Barkley's is a little more concise. And I used "then" when Excel doesn't like it.

2007-02-05 06:26:55 · answer #2 · answered by bequalming 5 · 0 0

I'm not quite sure what you mean about the "BEHIND" and "AHEAD" references, but it seems like you are looking for something that will do conditional formatting.

From the Title bar, go to "Format..." and then "Conditional Formatting..." I believe you'll find what you're looking for.

2007-02-05 06:25:08 · answer #3 · answered by Sidewinder 3 · 0 0

as a replace of using IF function, attempt the VLOOKUP function (or you should use HLOOKUP function, in case you like) assume you have saved the values a million, 2 upto fifty two numbers in E1 to E52 and Ac, 2c upto Ks in F1:F52. then you definately can write right here formulation in B1 to get your needed result = VLOOKUP(A1, $E$a million:$F$fifty two, 2, fake) wish this might do.

2016-10-01 11:30:35 · answer #4 · answered by tuberman 4 · 0 0

=if(a1>a2,"BEHIND "&a1-a2,"AHEAD "&a2-a1)

2007-02-05 06:27:41 · answer #5 · answered by Barkley Hound 7 · 1 0

fedest.com, questions and answers