#  Other Applications & Softwares  > Word Formatting & General >  > [SOLVED] Subtract formula and Text to numbers in MS Word Doc

## Neilesh Kumar

Dear Experts,

Please find here attached a sample MS Word Document, Is there any way where we can use the automatic outcomes for "Total Deductions" value in highlighted cell with yellow color (Total Payable - Net Payable), Paid Sum (In Word) from Net Payable Amount and all the value fields (from Basic Salary till Net Payable) to be separate with commas.

Request to you please do help me.

I hope i have explained about the expected outcomes. Please get back for further clarifications.

Sincerely,

Neilesh

----------


## macropod

That's as simple as using a formula field coded as:
{QUOTE{={MERGEFIELD TOTAL_PAYABLE}-{MERGEFIELD NET_PAY}}}
or:
{QUOTE{=«TOTAL_PAYABLE»-«NET_PAY»}}

*Note:* The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac or, if youre using a laptop, you might need to use Ctrl-Fn-F9); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, the chevrons (i.e. '« »') are part of the actual mergefields - which you can insert from the 'Insert Merge Field' dropdown (i.e. you can't type or copy & paste them from this message, either).

----------


## Neilesh Kumar

Dear Expert Macropod, Thank you so much for your precious support. Dear Expert, I have tried to put the provided formula but could not able to achieve the results. Since i am not a very well versed with MS Word formulae part, so would like to request to you can you please do provide the formula in attached sample workbook and provide me.

Thank you once again for your valuable support.

Sincerely,

Neilesh

----------


## macropod

It is very simple to do...
1. Insert your two mergefields, with a minus sign (hyphen) between them:
«TOTAL_PAYABLE»-«NET_PAY»
2. Select both of those fields and press Ctrl-F9 to create another field around them, and insert an equals sign at the start:
{=«TOTAL_PAYABLE»-«NET_PAY» }
3. Select the outer field you created in the last step,and press Ctrl-F9 to create another field around it, then type QUOTE at the start:
{QUOTE{=«TOTAL_PAYABLE»-«NET_PAY»}}
Done.

----------


## Neilesh Kumar

Thank you so much dear expert. It worked perfectly. Is there any way to convert merge field amount into text. for eg. if merge field "«NET_PAY»" amount is 50 then i can be show the value as well in text format "Rupees Fifty only". Request to you please do let me know.

Sincerely,

Neilesh

----------


## macropod

That can get very complicated. See: https://www.msofficeforums.com/mail-...mber-text.html

----------


## Neilesh Kumar

Thank you so much dear Expert for your precious support.

----------


## DannyPhilips

Great, I found a subject with a similar question, thank you very much for your help!

----------

