I have a calculation that is repeated numerous times in numerous fields. The only change in the calculation is a portion that refers to it's previous field:

e.g. Field 2 calc =

Case(RetCategory = "Tax";

(RetYr2WdAmt* (1-RetRrspTaxDeducted)) - RetYr2DepositAmt;

RetCategory = "No Tax";

RetYr2WdAmt - RetYr2DepositAmt; )

Field 3 calc =

Case(RetCategory = "Tax";

(RetYr**3**WdAmt* (1-RetRrspTaxDeducted)) - RetYr**3**DepositAmt;

RetCategory = "No Tax";

RetYr**3**WdAmt - RetYr**3**DepositAmt; )

The only difference between the calc in Field 3 vs Field 2 is the number 3.

I need to create calculations for 60 fields (in this example). Rather than using MS Word and performing find/replace, does anyone have an idea how to automate this?

The above example is simple but I do have other more detailed calcs that tend to make you cross-eyed after using Word find/replace after ten times and I have to do this for roughly 3,000 fields.

Thanks

Create a custom function to handle the math and pass the field number as a parameter for the function.