![]() |
#1
|
|||
|
|||
![]()
I created a fillable form using Word for Mac 2011 and so far all it great. The problem I am having is there is one area of the document where I would like a number to appear based on what text appears in the adjacent combo box. I know I can do this in excel using and If formula, but wondering if that can be done with Word. Attached is my example.
Thanks in advance. |
#2
|
||||
|
||||
![]()
See attached.
To learn how to do this and a wide range of other calculations in Word, check out my Microsoft Word Field Maths Tutorial, at the top of this forum: https://www.msofficeforums.com/word/...-tutorial.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Thank you. As much as I appreciate the document you sent, I am tight on time so I was hoping someone in the forum would be able to assess my specific issue and reply with a fix. I am not sure if my issue is even one that Word can do.
Thanks again. |
#4
|
||||
|
||||
![]()
You might at least open the document attached to my previous reply and have a look at what I've done...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
Thank you. I actually did review the document and can see it is quite detailed. Well done. I tried to search for the concept I was looking to perform (Combo box) but could not find it. Again, I was hoping to be able to use the Combo box function to select a calculation that would appear based on text I selected from another box. My guess is this is not possible, but I am unclear. The formulas you have in your document are excellent and will try and review as I have more time.
Note: This is my first ever post on this forum. |
#6
|
||||
|
||||
![]()
The calculation does vary according to what you choose in the 'piece/set' dropdown. What more do you want/expect?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
![]()
Yes. I am able to choose piece or set from the drop down menu, but the number to the left stays at $12 because it is a cross reference to a value in bullet point number 2, which is also $12. What I was looking for is to have the value in the last line change to $$3.00 ($12 cost divided by 4 pieces in the set) if I changed the adjoining combo box to piece instead of set. I hope that makes sense.
|
#8
|
||||
|
||||
![]()
Did you exit the 'piece/set' dropdown formfield? Formfields with the 'calculate on exit' property won't 'calculate on exit' unless you exit...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
![]()
Yes. I have the formfield set to calculate on exit. What I can't figure out is how to incorporate a formula in the field that populates the value (i.e. $12.00), so it can divide by 4 if I choose "individual piece". Hopefully that makes sense. Attached is a test Word Doc.
Thanks |
#10
|
||||
|
||||
![]()
This really isn't making much sense. Your latest attachment, just like you previous one, shows the $12.00 immediately before the 'piece/set' dropdown formfield being derived from whatever is in the PromoCost formfield. Using your own structure, I've given you a formfield that similarly employs whatever is in the PromoCost formfield but adds the functionality to divide that value by 4 when the 'piece/set' dropdown formfield's result is 'piece'. Are you now saying you want to use a value other than what is in the PromoCost formfield for the input?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#11
|
|||
|
|||
![]()
Hi. Sorry for the confusion. You are correct in that the $12.00 value that appears before the "piece/set" dropdown formfield is being derived from the PromoCost formfield above. I was hoping to somehow be able to add a formula to the existing formfield that appears after before the Piece/set" dropdown formfield which would divide the above PromoCost value by 4. Perhaps I need to delete that current formfield and replace it with a new formfield that accepts formulas. This is where I am stuck.
|
#12
|
||||
|
||||
![]()
Which is precisely what the field I provided does...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#13
|
|||
|
|||
![]()
Oh Paul... I am a complete nincompoop. I did not see you attached a Word Doc with this formula in it in your first response to me!!!! I only saw the link you included in that message. So Sorry! I would like to blame this mistake on the fact this is my first post to this forum, but I should have seen it as I have been on other forums such as excel.
The formula you have is great and works just as I was hoping. I have one more question. If I want to change the number of pieces in the set from 4 to 5, but reference another combo field, is this possible? I tried to change the formula to reference the new field I created but I got an error. See attached updated Word Doc. Thanks in advance. |
#14
|
||||
|
||||
![]()
Where you've added 'TotalPieces' to the formula, select that and press Ctrl-F9 to enclose in it a pair of field braces, thus { TotalPieces }, then insert 'REF' so you end up with { REF TotalPieces }. Protect the form & edit the TotalPieces dropdown to force an update. That's all there is to it.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#15
|
|||
|
|||
![]()
Fantastic! Works like a charm. Thanks for your help and patience!
![]() |
![]() |
Tags |
calculations, combo box, formulas |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Something Anon | Word | 4 | 03-26-2014 03:53 PM |
![]() |
Jschueller | Word | 1 | 08-20-2013 01:51 PM |
Adding controls to a form. | supercrewed | Outlook | 0 | 02-14-2013 02:12 PM |
Form controls in Excel 2011 for MAC | AHB | Excel Programming | 0 | 12-28-2011 10:57 AM |
Content Controls Form Programming | beachdog | Word VBA | 4 | 09-20-2011 10:26 AM |