Conditional Text in Excel
You can use Microsoft Excel functionality to display text conditionally based on Salesforce information. This information is record dependent, and depends on the options selected for the current Document Package. For example, if the Document Package has an Opportunity relationship, then Opportunity fields can appear for that Document Package.
In the following example we are going to add an Account record field to an Excel document using the appropriate tags and field name.
Add fields to Excel
In order for fields to be added to Excel you have to add the desired field from Salesforce and then use Excel formulas.
-
Assign the field to a cell in Excel.
In the example above the field being added to the Excel document is called "Account_NumberofEmployees".
-
Once you have mapped your Salesforce fields in Excel, you must use formulas to reference the mapped cells.
-
In our example, we use an IF formula. The syntax is [ =IF(evaluation, true statement, false statement) ].
Where:
-
Inputs!B2>50 is the evaluation
-
"This company employs more than 50 people." is the true statement
-
"This company employs less than 50 people." is the false statement.
-
Note: You must reference the cells that contain the Field Tags (Example: A2 ) instead of the range (Example: Account_Name).