• Home
  • Services
  • Experience
  • Blog
  • Join Our Team

Call us 253 279 3682

Dialed In DataDialed In Data
  • Experience
  • Salesforce Administration
  • Salesforce Coaching
  • Contact Us

Do-It-Yourself Year-End Tax Letters

08/27/2019 Posted by Jillian Nonprofits, NPSP 21 Comments

Create letters with giving statements using only Salesforce, Excel, and Word

I attended my first NPSP Day in Seattle this year (if you haven’t been to an NPSP Day, I highly recommend checking it out). Activities included a “Speed-Geeking” session (similar to speed-dating, but with demonstrations of cool apps, Salesforce tricks, etc.). I shared a demo of how to create year-end tax letters/statements (or any other similar document) without a third-party application.

The few minutes I had to demonstrate weren’t quite enough to go into all the details of this process, and I promised to share a tutorial online. At long last, here are the instructions so you can try it yourself!

Step 1: Create the report in Salesforce.

I recommend using the Opportunities report type (if you use Payments, then an Opportunities with Payments report type; and/or if you aren’t on the Household Account model, you may want to include Households in the report type).

  • Include the following filters:
    • Closed/Won (or Paid=TRUE) records
    • Amount greater than $0
    • Select the Record Types or Types you want included in the statements on your letters
    • Close Date (or Payment Date) in the time period you prefer (e.g. last year)
    • Billing Street and Billing Zip aren’t blank (this helps filter out those without valid mailing addresses)
    • Account Record Type equals Household Account (if you want to include businesses, you don’t need this filter, and may need to adjust these instructions a bit)
  • Include the following fields:
    • Formal Greeting
    • Informal Greeting
    • Opportunity Record Type and/or Opportunity Type
    • Amount
    • Auction Non-Deductible Amount (or any other field you use to track the non tax-deductible amount on ticket purchases, etc., this is a field from the Auctions app)
    • Close Date (or Payment Date if using Payments)
    • Address fields (Billing Address Line 1, Billing City, etc.)
    • If you have households/Accounts with the same Formal Greeting, include the Account ID and/or Account Name fields – so you have a field to use to identify the different households/recipients

PRO TIP: Save this report to use again in future years.
Once you’ve “dialed in” your report, export it (details only) and open it using Excel.

Step 2: Prepare the spreadsheet.

  • If you’re using Classic, delete those extra rows at the bottom of the sheet (with the report name and such)
  • In the Formal Greeting column, enter a zero (“0”) in the next available cell
  • Sort the entire sheet by the Close/Payment Date (ascending), then sort it by Formal Greeting Column A-Z (ascending), this should put the mostly empty row with a zero in the Formal Greeting column at the top of your report
  • Enter an “X” (or “ZZ” – something at the end of the alphabet) in the blank row at the end of the report in the Formal Greeting column
  • If your Opportunity Record Type or Type names are a little admin-y (e.g. “GW Auction Ticket”), use the find/replace function to make them more donor-friendly (e.g. “Event Ticket”)
  • Insert a column next to the Formal Greeting column (right-click the top of the column to the right and click “Insert”). Enter the following in that new column:
    • Give it a heading (I use “Count”)
    • Enter a formula in the second cell and copy it down to the last row – the one with an “X” or “ZZ” in it.
      • If Formal Greeting is column C and Count is column D, the formula in the first cell (D2 in this example) would be:

=IF(COUNTIF(C:C,C2)>1,IF(C2=C3,”many”,”last”),1)

Note: If you aren’t able to use Formal Greeting as the unique identifier for accounts, update the formula to refer to the column with the identifier instead of the Formal Greeting column.

Save your report as a “.xlsx” file.

Step 3: Prepare the letter/statement template.

  • Start with a new/clear Word document (if you have a letterhead to use, go ahead and use/set that up)
  • Begin the mail merge by selecting Mailings > Start Mail Merge, and select DIRECTORY (this is the most important step – if you forget it, you’ll sit there troubleshooting until the cows come home)
  • Select the spreadsheet you prepared/saved as the data source
  • Now things get complex, we’re going to set up the merge fields on the template. Unfortunately, you cannot copy and paste the text, you’ll have to type it in manually.
    • This letter is made up of several IF/THEN statements, which are unique in Word
    • For each set of {} brackets, you will need to insert them by pressing Ctrl + F9 (Mac users: press Command + fn + F9)
      • This video demonstrates how to type merge information/set up those brackets (it isn’t specific to these letters, but this is the video that taught me what I needed to know to do this)
    • Every part of the template is within at least one set of brackets.
      • Remember: each opening bracket “{” is typed using Ctrl+F9, then type within the brackets that are created – do not type any brackets yourself
    • If you “lose” the brackets (that is, if Word just shows the text, and you don’t see the merge information anymore), simply highlight all the text (Ctrl+A or ⌘+A), right-click, and select “Toggle Field Codes”
      • You can also do this to “hide” the brackets/merge info
    • Any set of brackets that begins with “MERGEFIELD” (e.g. “{ MERGEFIELD Informal_Greeting}”) can be inserted using the “Insert Merge Field” option in the “Mailings” tab of the Word ribbon – I recommend inserting fields this way to account for differences in field/column names
mergefield samples
Examples of fields that can be inserted via “Insert Merge Field” are yellow.

Following is how the first page of the template should read.

You will notice that the majority of the page is typed within the brackets that begin

{ IF {Place2} <> {Place1} "

The text begins after the quotation mark, and continues until after the Date/Type/Amount/etc. line. After that line, another IF statement comes into play (Ctrl + F9 – don’t forget!), and the rest of the page, along with the page break, fall after the quotation mark in that IF statement.

Watch out for the quotation marks – they’re very important.

Page 1 Image
The blue highlight is optional, if all of your donors only have one line of street address, you do not need the 2nd (and if they have 3 lines, you will need to add the 3rd street line as well).

Keep in mind you have to type the text of your letter, you can’t copy it from somewhere else. You can insert an image (the signature, for example), as long as you place the cursor where you want the image (still within a set of brackets), then insert the image.

Important: part of the template is inserting a page break after the end of page 1.

I initially tried to set up the statement portion of the letter using a table, but that did not work out well. Instead, you can specify indentation points (not sure of their official name) in the ruler. Much of the document will have the left margin all the way to the left, but the parts with the “statement” will be indented. Here’s what mine looks like, as a reference:

Page 2 continues the IF statements from page 1

Note that this page begins with a quotation mark (right after the page break from page 1). It also ends with another page break (page breaks can be added via Insert > Page Break).

This page also closes out the second IF statement from page 1 (the one you created under the Date/Type/Amount/Etc. line).

Page 2 image

Page 3 – the final page

This page also begins with a quotation mark. It includes the brackets that close the IF statement you began on page 1. Keep in mind that bracket is there as soon as you set up the IF statement, you’re simply typing within the brackets (within a set of quotation marks within the brackets, to be specific).

Note: The final paragraph/line is important (that last ¶ on the page). It’s the one piece of writing that falls outside of the brackets.

Page 3 image

After you select all and “Toggle Field Codes” to hide the brackets/merge information, your document/template should look similar to the following (plus an extra blank-looking page).

Step 4: Merge the letters and clean up.

Because you selected “Directory” in the mail merge process, you will not be able to use the Preview feature to preview your merge. Instead, select Mailings > Finish & Merge > Edit Individual Documents to generate a Word document with all of your letters.

Your new document will include a letter at the beginning and a letter at the end that each need to be deleted. This is why we added the “0” and “X” (or “ZZ”) items in the Formal Greeting column of the spreadsheet. Select the text for each letter, including the page break, and delete.

I recommend saving the document of merged letters (just in case anything happens), and doing a brief spot-check for any issues or errors. Donors with a high number of opportunities may spill into a second page, be sure to double-check the formatting on those. Then you’re ready to print!

Pro tip: if you need labels, you can set them up using the same spreadsheet you used for the letters:

  1. In the Excel document with the spreadsheet, right-click the spreadsheet name (displayed as a tab below the sheet) and select “Move or Copy”
  2. Mark the “Create a Copy” checkbox and select a spot in the same Excel workbook, or a new one – whatever you prefer
  3. In the new/copied sheet, select “Remove Duplicates” in the Data tab of the ribbon
  4. Mark that your list has headers, and tell it to compare based on the column with Formal Greeting (de-select the rest of the columns)
  5. Save the document, then use Mail Merge to create labels, using the new sheet as the list for your labels

Congratulations, you did it! “It” meaning you stuck it out through this very long tutorial and, more importantly, created your tax letters! There are a variety of customizations you can apply to this process – addressing to businesses, emailing the statements, adding donation totals, playing with the format. As you feel comfortable, try different things and see what works best for you.


Let me know your thoughts and questions in the comments. If there’s enough interest, I’m thinking a video tutorial may be helpful as well. We will see!

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)

Like this:

Like Loading...

Discover more from Dialed In Data

Subscribe to get the latest posts sent to your email.

21 Comments
Share
0

You also might be interested in

Meet Jax

Meet Jax

Sep 29, 2023

He’s been on the team for nearly a year now,[...]

Sharing a local job opportunity

Sharing a local job opportunity

Nov 19, 2019

A beautiful thing about the nonprofit Salesforce community is all[...]

I completed a new certification – and you can too (if you want)

I completed a new certification – and you can too (if you want)

Jun 26, 2019

I completed and passed the Nonprofit Cloud Consultant certification exam[...]

21 Comments

Leave your reply.
  • JessieRymph
    · Reply

    08/27/2019 at 1:28 PM

    Well done! This is excellent! Your website looks really good too.

    Loading...
    • Jillian
      · Reply

      08/27/2019 at 4:18 PM

      Thank you, Jessie!

      Loading...
  • jimmilne
    · Reply

    10/29/2019 at 5:14 PM

    After struggling to get all of this typed in, interruptions interruptions, I seem to have an error in which only the first two donations show on the page. Additional donations get places on their own, individual, pages. I know it has to be an error in the if statement somewhere but I just can’t see it in my work. I’ll keep plugging away though cause this would save my org an awful lot of time.

    Loading...
    • Jillian
      · Reply

      Author
      11/13/2019 at 7:02 PM

      I’m glad it will save you time! It does sound like something is off in one of the if statements, those certainly give me quite the headache.

      Let me know if you’d like me to take a quick look for you at all (via screen share is probably best), maybe a fresh set of eyes can help! (Sorry for the late reply, the notification went to my spam.)

      Loading...
      • David
        · Reply

        01/13/2025 at 4:23 PM

        I’m wondering how this was fixed because I’m running into the exact same issue.

        Loading...
      • David
        · Reply

        01/13/2025 at 4:34 PM

        Hi, I was wondering if there was a solution to this because I’m running into the exact same issue. Thanks!

        Loading...
        • Jillian

          Author
          01/21/2025 at 2:00 PM

          Hi David, it sounds like there is something missing in the merge code. I suspect that there is either an extra Page Break somewhere, or a quotation mark in the wrong place (most likely a misplaced or missing quotation mark). I suspect you can find it if you double-check the second page, but it might be on one of the other pages if it isn’t there. Let me know if that doesn’t help!

          Loading...
  • Nikki
    · Reply

    01/23/2020 at 10:44 AM

    This was amazing and so helpful, Jessie. Thank you. It took a good bit of time to work through, but I know this will save us a ton of time in future years! I also added in a total giving field using the Excel Subtotals function. I created two additional columns at the end of my spreadsheet, and using if statement formulas, I copied the subtotal amount from below each household over to one of the columns based on whether the count for that row contained “1” or “last”. I named the columns “Amount Total 1” and “Amount Total Last,” and then inserted those mergefield names into the corresponding if statements in the Word Doc directory file. Thanks again!

    Loading...
  • Nikki
    · Reply

    01/23/2020 at 10:44 AM

    oops, Jillian* not Jessie!

    Loading...
    • Jillian
      · Reply

      Author
      01/23/2020 at 10:52 AM

      Thank you! And I just was reviewing this with a customer and saying they could include a total as well – great minds!

      Loading...
  • Tami
    · Reply

    01/16/2022 at 7:58 AM

    Great info Jessie, I’d love a video! I’m also looking for a way to add subtotals per donor designation, i.e., GAU’s as well as the grand Total. I work with several orgs one of which would like the grand total to be at the top of the page before formal address, details within the letter with subtotals per GAU and a grand total. Tried to talk them into having it all

    Loading...
    • Jillian
      · Reply

      Author
      01/18/2022 at 2:00 PM

      Thanks Tami! (Assuming you meant Jillian, rather than Jessie 🙂 I’ll see if I can arrange for a video walk through and will let you know if/when I’ve put one together.

      Regarding the donor designation totals – not having all the information on each org’s configuration and needs, I wonder if you could accomplish that with some customizable rollups (for the GAU subtotals, as well as the grand total). If they aren’t interested in an itemized statement, it would make it a simpler/easier mail merge (just pulling a report of households, with all applicable rollup summaries (don’t forget to run the rollup batch before exporting your report!)). If they are looking for an itemized statement as well, you might consider pulling a report of Opportunities & GAUs, and in Excel, make a copy of the report and remove duplicates (or whatever method you prefer) to reduce the list so there’s one row per opportunity, then add some columns with the totals for the different GAUs (using a SUMIF formula that refers back to the original copy of the report that you exported) before proceeding with your mail merge. Those aren’t very in-depth instructions, let me know if you need any clarification!

      Loading...
  • Ellie
    · Reply

    01/27/2022 at 11:49 AM

    This has been super helpful – I’ve been able to create a statement – but will need to experiment with formatting. One thing we need, though, is how to include total gift amounts for each donor. I think it would be along the lines of what Nikki was saying (above), but I’m not quite sure how to execute that. Could you help?

    Loading...
    • Jillian
      · Reply

      Author
      01/27/2022 at 1:06 PM

      Hi Ellie, thank you! I can certainly make an attempt at helping:
      -To add total(s), you’ll first add them in the Excel document
      -Add a column (or two, if you need a total for the full amount and a total for the non-deductible amount/value received)
      -Give the column a title (e.g. Total)
      -In that column, you’ll use a SUMIF formula to total the amount of all gifts in the spreadsheet for that account; if you are using Formal Greeting as the unique identifier for your accounts, then the formula would go along the lines of SUMIF([Column with Formal Greeting],[Formal Greeting for the row the formula is in],[Column with amount you want to total]) if the Formal Greeting was in column C, and the amount in column H, the formula for the first row (row 2) would be SUMIF(C:C,C2,H:H)
      -Repeat if needed for the non-deductible amount
      -Save your spreadsheet!
      -In Word, you’ll add those merge fields at the end of the list of donations (which means you’ll technically do it twice, once for the iteration for those who made only one gift, and once for those who made more than one)

      That might not be quite enough detail, but I am planning to make a video of this sometime soon, and will include this in that video too.

      Loading...
      • Ellie
        · Reply

        03/10/2022 at 9:21 PM

        Jillian, Thank you for your quick reply! I was finally able to get back to working on generating a statement, and I was able to add the total per your instructions. One thing funny though, when I generate the statements, the statements with “many” entries have the donation entries double-spaced – nowhere in the template do I see that I’ve put in a double-space. Do you know what I might have done incorrectly? Thanks again.

        Loading...
        • Jillian

          Author
          03/12/2022 at 4:38 PM

          Hi Ellie, I’m glad you were able to get it all to work! Regarding those double-spaces, I’d check for any spaces outside of the outermost brackets (the ones that everything is inside of), as well as inside the quotation marks of the part of the template that’s at the top of the page in this image: https://i0.wp.com/dialedindata.com/wp-content/uploads/2019/08/Screen-Shot-2019-08-26-at-9.47.07-AM.png

          You might even try using Ctrl+F to search for a double-space in your template.

          If you wanted to email the template to jillian@dialedindata.com, I can give it a quick look in the next week or so and let you know if I’m able to find it.

          Loading...
  • Ellie
    · Reply

    01/27/2022 at 12:22 PM

    This has been super helpful. Thank you Jillian! I’d like to add a “total” – Nikki addressed it above, but I don’t quite understand how she’s doing that. Could you help? Thanks.

    Loading...
  • Joy Riznikove
    · Reply

    01/30/2024 at 9:12 AM

    oh my this does not work for me. For some reason, the “many” ones only have two lines per page after the merge. I have looked at all my field codes and everything but can’t find it.

    Loading...
  • James
    · Reply

    01/07/2025 at 8:17 AM

    I know I am very late to the party here! But I found this and used it–so great! But I have one error I can’t fix: I’m getting one donation on a new page, with a blank page in between, rather than an itemized listing on a new line on one page. I checked my code and I don’t see any difference from yours but I’m sure I’m missing something. Any ideas what it could be?

    Loading...
    • Jillian
      · Reply

      Author
      01/21/2025 at 2:06 PM

      Hi James, if your code is all correct (including quotation marks and other markup – even outside of the code), the other thing to check/confirm is that you selected “Directory” as the mail merge type. Let me know if that helps!

      Loading...

Leave a ReplyCancel reply

Follow Us

  • Facebook

Latest Posts

  • New for Dialed In Data customers: Donor Statements App Meet the Donor Statements app from Dialed In Data Dialed...
    Read More
  • Meet Jax He’s been on the team for nearly a year now,...
    Read More
  • Setting up NPSP Address Verification With the addition of Address Management for the Household Account...
    Read More
  • Where to Learn to “Admin” You may see the term “Accidental Admin” in a lot...
    Read More
  • I’m still here! (And a little on work-life balance) Hi, Jillian here. I think I will always be working...
    Read More
  • Job Opportunities in Tacoma! We’re always excited about opportunities in our hometown. As we...
    Read More
  • A Job Opportunity in Seattle We recently learned of another job opportunity in Seattle with...
    Read More
  • Sharing a local job opportunity A beautiful thing about the nonprofit Salesforce community is all...
    Read More
  • Do-It-Yourself Year-End Tax Letters Create letters with giving statements using only Salesforce, Excel, and...
    Read More
  • I completed a new certification – and you can too (if you want) I completed and passed the Nonprofit Cloud Consultant certification exam...
    Read More
  • Introducing Dialed In Data! When I first began this business, I wasn’t feeling particularly...
    Read More

Subscribe

Subscribe to our blog and receive an email when we post (about once per month).

Contact Us

Send us an email and we'll get back to you, asap.

Send Message

Call Us:

  • 253-279-3682

© 2026 Dialed In Data

  • Home
  • Services
  • Experience
  • Blog
  • Join Our Team
Prev Next
%d