Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-09-2014, 03:02 AM
macropod's Avatar
macropod macropod is offline Using fields to test on empty ? Windows 7 64bit Using fields to test on empty ? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

A word formula using a cell reference cannot differentiate between 0 and empty. However, it can be done if the ranges are bookmarked and you test the bookmark contents. The easiest way to do that is to use formfields for the data entry in a document using forms protection. That also gives you the advantage of being able to use the formfields' 'calculate on exit' property to auto-update the calculations.

In a generalised sense, the calculation field to evaluate the content is:
{IF{REF MyFld} = {=MyFld} "{MyFld} is Numeric" "{MyFld} is Text"}}
where 'MyFld' is the formfield's internal bookmark name.

Thus, for your purposes, the field might be coded as:
{IF{REF Text1} = {=Text1} {IF{REF Text2} = {=Text2} {={Text1}-{=Text2} \# "+0,00;-0,00;0,00"}}}
where 'Text1' & 'Text2' are the formfields' internal bookmark names.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
test Cheekychino PowerPoint 1 04-08-2013 09:09 PM
Using fields to test on empty ? Write Test dkub Word VBA 1 07-21-2012 09:01 PM
Apparently empty (blank) cells aren't empty daymaker Excel 3 03-08-2012 03:41 PM
Using fields to test on empty ? Vba, Is there a better way to test empty cells? Hwyn Excel Programming 2 11-14-2011 11:44 AM
Test after presentation? barnkat PowerPoint 0 08-13-2010 10:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:18 PM.


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