View Single Post
 
Old 11-23-2016, 06:51 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit 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

Quote:
Originally Posted by Father View Post
I'm talking about this:
Dept = { FORMDROPDOWN }
{IF{REF Dropdown1 \* MERGEFORMAT}= "HR" "001"}
When the number, in this case 001, is generated by the IF condition, how do you use that number in a calculation/formula? The "001" has no bookmark to use in another formula. What would be the reference?
The 001 is simply the displayed output. You don't reference that in a calculation; only whatever Dropdown1 returns. You can also lose the ' \* MERGEFORMAT' - it's quite unnecessary. So, if you want to use th, you'd code along the lines of:
{={IF{REF Dropdown1}= "Finance" 2 {IF{REF Dropdown1}= "HR" 1 0}}*5}
where 5 is whatever you want to multiply the selected item's value by. However, that's really no different than:
{IF{REF Dropdown1}= "HR" 5}{IF{REF Dropdown1}= "Finance" 10}
I suggest you take a look at my Microsoft Word Field Maths Tutorial, available at:
http://windowssecrets.com/forums/sho...Maths-Tutorial
and:
http://www.gmayor.com/downloads.htm#Third_party
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote