Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2016, 11:01 PM
SMI SMI is offline Need help with IF formula Windows 7 64bit Need help with IF formula Office 2007
Novice
Need help with IF formula
 
Join Date: Jan 2016
Posts: 3
SMI is on a distinguished road
Default Need help with IF formula

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
Reply With Quote
  #2  
Old 01-19-2016, 02:12 AM
macropod's Avatar
macropod macropod is online now Need help with IF formula Windows 7 64bit Need help with IF formula Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,342
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 01-19-2016, 06:28 AM
SMI SMI is offline Need help with IF formula Windows 7 64bit Need help with IF formula Office 2007
Novice
Need help with IF formula
 
Join Date: Jan 2016
Posts: 3
SMI is on a distinguished road
Default Need help with IF formula

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?
Reply With Quote
  #4  
Old 01-19-2016, 06:33 AM
SMI SMI is offline Need help with IF formula Windows 7 64bit Need help with IF formula Office 2007
Novice
Need help with IF formula
 
Join Date: Jan 2016
Posts: 3
SMI is on a distinguished road
Default Need help with IF formula

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
Reply With Quote
Reply



Similar Threads
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
Need help with IF formula Need help with a formula e_a_g_l_e_p_i Excel 14 02-07-2013 12:37 AM
Need help with IF formula formula help 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft