![]() |
#1
|
|||
|
|||
![]()
Hi guys,
I am using the following simple formula: IF A2>B2"( + )""( - )" I am using this in a table within Word document. Let's say I am comparing value (numbers) in column "A" with value in column "B", I want to determine if the value in column "A" is greater than value in column "B", if so I want to show a "+" sign in column "C", otherwise it should be "-" sign. But this is not the case. Even if I have smaller value in column "A", the above formula is still giving me "+" sign which is wrong. Any idea how to fix this error? Thanks in advance. Syed Last edited by Charles Kenyon; 01-19-2016 at 06:59 AM. Reason: Mark as solved |
#2
|
||||
|
||||
![]()
You could use:
{IF{=A2 }>{=B2 } "( + )" "( - )"} (All braces are field braces, not ordinary ones); or: {=B2- A2 \# "'( - )';'( + )'"} To see how to do a wide range of calculations in Word, check out my Microsoft Word Field Maths Tutorial, at: http://windowssecrets.com/forums/sho...Maths-Tutorial or: http://www.gmayor.com/downloads.htm#Third_party
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hi Macropod
Many thanks for your help. I got luck with the 2nd option you have shared. It works as expected. However with the If condition I am either getting a syntax error or there is no result. Note that I am first pressing CTRL+F9 and then inserting the formula in your suggestion that begins with IF up till the final quotation mark. I guess I am making some mistake because you have mentioned that all braces are field braces. Does it mean that all the other braces in between should also be inserted using above keyboard shortcut? |
#4
|
|||
|
|||
![]()
Oh yes, exactly what I thought about my mistake. The repeating braces when inserted using CTRL+F9, worked fine. So now I have both options available for me.
You have no idea how desperate I was to figure this out. Thank you very much and have a nice day. Kind regards Syed |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help with dragging a formula and changing a reference column as I drag the formula. | LupeB | Excel | 1 | 10-22-2015 03:02 PM |
Formula Help | OTPM | Excel | 5 | 02-21-2013 08:03 AM |
![]() |
e_a_g_l_e_p_i | Excel | 14 | 02-07-2013 12:37 AM |
![]() |
rich_cirillo | Excel | 3 | 09-26-2012 11:41 PM |
help with a look up or if formula | beb1227 | Excel | 3 | 12-31-2011 01:08 PM |