April 9, 2024
Contribute to the Microsoft 365 and Office forum!
Click here to learn more 💡
May 10, 2024
Word Forum Top Contributors:
Formula not calculating numbers with plus signs
However, the formula only registers the minuses. So, if "+$500.00"and "-$300.00" are filled in, the formula will yield a sum of "-$300.00." I guess it is not recognizing "+$500.00" as a number.
Is there any way to change this?
(Of course, I know that removing the plus signs would fix the problem, but I'm required to use the plus signs on the forms, so that's not an option.)
Here's a link to the document: https://app.box.com/s/430yc3hephrec3t3nydu
Thanks for your help!!
Report abuse
Thank you.
Reported content has been submitted
* Please try a lower page number.
* Please enter only numbers.
On the Insert menu, select Quick Parts. Select Field. Under Categories select Equations and Formulas. Select Symbol. Type 43 in the Character Number box. Select Ok. That will insert a valid plus sign and formula should work. You can copy and paste it then to other places.
ps.
Sorry, that will only work if the $500 is in the cell outside of the box.
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
At the same time, I'm designing this form for other users, and they might have trouble with that.
Also, I'd prefer to keep the form fields, if at all possible.
Do you think there might be any other workarounds?
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Does anyone know any other way to get the formula to add numbers with plus signs preceding them? Is there perhaps some kind of macro that would fix this problem?
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Thanks so much, Mike. That's a pretty good tip.
At the same time, I'm designing this form for other users, and they might have trouble with that.
Also, I'd prefer to keep the form fields, if at all possible.
Do you think there might be any other workarounds?
Well, I see cutting the content box can be avoided by tabbing into the $500.00 cell, hitting the left arrow twice. That will take you outside of the content box, but looks like you still have to insert the plus sign as a field and not just type it in, in order
to get it to work. A copy and paste of the plus sign (field) would make it a bit easier.
p.s.
you can create the first + sign as a field and then add that to the Quick Parts menu so it would be available every time you hit the two left arrows to get outside the content box.
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Here's a crude macro approach that seems to work if your tables consist only of manually entered numbers (the "+" and "-" figures in items A. through I.) and a calculated field at the bottom (e.g., an "=SUM(ABOVE)" field), Basically I did a universal find/replace, changing "+$" to " $" (two spaces and the dollar sign). Then I selected the whole file and updated the fields using F9. Then I went back and replaced all occurrences of "<space><space>$" with "+$" (which just restores the original "look" of the positive entries).
Initially replacing the "+" with two spaces will allow the positive values to be included in the "update fields" calculation, and using two spaces will (a) make it easier to find the "tweaked" entries and restore them, and (b) leave alone any uninvolved entries (i.e., the "$0.00" numbers) that might have been originally typed in with a single leading space (we don't want to turn them into positive values that read "+$0.00").
If you gave this macro a name like “Compute_Totals” and instructed users to run it after filling in the appropriate blanks, they could get the right results without having to delve into rocket science. As a rank beginner in VBA, I cheated and just recorded the steps, so the code below is primitive and overly long. However, I’m sure the real experts on this board (CRD Maxey, Mr. Robbins, Rohn007, Ms. Barnhill? Anybody home?) could translate my notion into a cleaner and more robust piece of code. Hope this helps . . .
Sub Compute_Totals()
' Compute_Totals Macro
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "+$"
.Replacement.Text = " $"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.WholeStory
Selection.Fields.Update
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " $"
.Replacement.Text = "+$"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
End Sub
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
(I apologize if this is a ridiculous question. I have limited experience with macros.)
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Selection.WholeStory
Selection.Fields.Update
that will select the entire file (including all fields) and then update the fields. That supplants the need to update the formulas manually. Then the macro goes back and restores the original "+$xxxx.xx" appearance of your entries.
If it were me, I'd assign the macro to the Quick Access Toolbar (probably using the little calculator icon as a mnemonic device); distribute it in a macro-enabled template; and tell users to just "click on the calculator icon once you've entered all your numbers."
Unfortunately, as a VBA neophyte I'm still wrestling with the best way to package and distribute macro-enabled templates to other users. The templates have to be stored in the right place, and the security settings all have to be correct for the macros to work. Rather than having me lead you astray, I'd suggest asking the experts on this board to help with that (it's a regular topic of discussion on this forum).
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
In your Word table when you are establishing your formula in your Formula window, in the Format Field , enter: +0;-0;0
This will provide you with a “+” sign for Positive numbers, a “–“ sign for negative numbers, and “no sign” for zeroes. This is the same method that you would use in Excel when establishing a custom number format.
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Question Info
Last updated October 5, 2021 Views 118 Applies to: