Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-29-2015, 10:39 PM
Sven Weichbrodt's Avatar
Sven Weichbrodt Sven Weichbrodt is offline Creating an 'IF' Formula in MS Word 2010. Windows Vista Creating an 'IF' Formula in MS Word 2010. Office 2010 64bit
Novice
Creating an 'IF' Formula in MS Word 2010.
 
Join Date: Jun 2015
Location: New South Wales
Posts: 4
Sven Weichbrodt is on a distinguished road
Default Creating an 'IF' Formula in MS Word 2010.

Hello All, long time lurker, first time poster.



I have a tricky one for all those Word 2010 guru's out there.

I am trying to get create an audit tool based in Word 2010.

In cell E5 I have created a drop-down box which gives the user 3 options, these being YES, NO and NA.

In cell E8 I wish to create an 'IF' Formula that, depending on the choice the user makes in cell E5, will return

The number 1 for Yes
The number 0 for No
The number 1 for NA.

So far, the advice I have received has led me to create the following formula.

{IF{=E5}= Yes "1" {IF{=E5}= No "0"{IF{=E5}= NA "1"}}}

I am happy that I am not receiving the dreaded !Syntax Error, ) message any more. I am not happy that the formula appears to do nothing, the cell remains blank once I click OK on the 'Insert Formula' tab.

Is it the drop down box that is causing the problems?

Any and all help appreciated as this has me completely and utterly stumped.

Thanks for all your help.
Reply With Quote
  #2  
Old 06-30-2015, 01:49 AM
gmayor's Avatar
gmayor gmayor is offline Creating an 'IF' Formula in MS Word 2010. Windows 7 64bit Creating an 'IF' Formula in MS Word 2010. Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Let's start off by asking what kind of dropdown box have you added? Is this a legacy form field, a content control or an active-X dropdown?
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 06-30-2015, 05:05 AM
Charles Kenyon Charles Kenyon is offline Creating an 'IF' Formula in MS Word 2010. Windows 8 Creating an 'IF' Formula in MS Word 2010. Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,470
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You may also want to enclose your test text in quotation marks.
Reply With Quote
  #4  
Old 06-30-2015, 03:33 PM
Sven Weichbrodt's Avatar
Sven Weichbrodt Sven Weichbrodt is offline Creating an 'IF' Formula in MS Word 2010. Windows Vista Creating an 'IF' Formula in MS Word 2010. Office 2010 64bit
Novice
Creating an 'IF' Formula in MS Word 2010.
 
Join Date: Jun 2015
Location: New South Wales
Posts: 4
Sven Weichbrodt is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
Let's start off by asking what kind of dropdown box have you added? Is this a legacy form field, a content control or an active-X dropdown?
Hello gmayor. Via the DEVELOPER tab I clicked on the DROP DOWN LIST CONTENT CONTROL icon and went from there.
Reply With Quote
  #5  
Old 06-30-2015, 03:34 PM
Sven Weichbrodt's Avatar
Sven Weichbrodt Sven Weichbrodt is offline Creating an 'IF' Formula in MS Word 2010. Windows Vista Creating an 'IF' Formula in MS Word 2010. Office 2010 64bit
Novice
Creating an 'IF' Formula in MS Word 2010.
 
Join Date: Jun 2015
Location: New South Wales
Posts: 4
Sven Weichbrodt is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
You may also want to enclose your test text in quotation marks.
Thanks Charles. Is that the only issue you could see in the formula I posted above or do you recommend other tweaks?
Reply With Quote
  #6  
Old 07-01-2015, 01:05 AM
macropod's Avatar
macropod macropod is offline Creating an 'IF' Formula in MS Word 2010. Windows 7 64bit Creating an 'IF' Formula in MS Word 2010. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
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

Word's formula fields cannot test text values in table cells, so no amount of tinkering with a formula using cell references will work in this case. The only way of getting this to work via field coding is to bookmark the Yes/No/NA text and test the bookmark's contents.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 07-01-2015, 03:43 PM
Sven Weichbrodt's Avatar
Sven Weichbrodt Sven Weichbrodt is offline Creating an 'IF' Formula in MS Word 2010. Windows Vista Creating an 'IF' Formula in MS Word 2010. Office 2010 64bit
Novice
Creating an 'IF' Formula in MS Word 2010.
 
Join Date: Jun 2015
Location: New South Wales
Posts: 4
Sven Weichbrodt is on a distinguished road
Default

Thank you macropod. What exactly do you mean by BOOKMARK?
Reply With Quote
  #8  
Old 07-01-2015, 03:52 PM
macropod's Avatar
macropod macropod is offline Creating an 'IF' Formula in MS Word 2010. Windows 7 64bit Creating an 'IF' Formula in MS Word 2010. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
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

I mean precisely that - a bookmark you'd create via Insert|Bookmark.

To see how to a wide range of calculations in Word, including calculations of this kind, 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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating an 'IF' Formula in MS Word 2010. Formula for creating Account Name Gef Excel 2 03-11-2015 07:48 PM
Assistance with Word 2010 If formula ciresuark Word 1 03-09-2015 12:57 PM
Creating High Quality PDFs from Word 2010 BrazzellMarketing Word 11 01-27-2012 01:06 PM
Creating an 'IF' Formula in MS Word 2010. Creating templates for dummies in Word 2010 oceanclub Word 1 07-14-2011 08:39 PM
Help with creating a Formula, please websiteaog Excel 9 11-25-2010 04:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:44 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