Tuesday, December 15, 2015

yogi_Pull Names Of Donors That Contributed In Specified Month And Year Of Last Year And Have Not Contributed Since Then

Google Spreadsheet   Post  #1990
Yogi Anand, D.Eng, P.E.      ANAND Enterprises LLC -- Rochester Hills MI     www.energyefficientbuild.com.   Dec-15-2015
post by  Steve Thomasson:
Help with Query
Hi, I hope someone can help.
I have a Google sheets that has a list of donors and the dates of donations and their contact information.  Some donors donate multiple times per year.  I am trying to use query to generate a list of people who donated in the current month one year ago, but EXCLUDE any names that may have donated more recently.   We are trying to generate a list of people to contact to see it they would be willing to donate again but don't want to bother them if they have already donated more recently than one year.

Any ideas on how to do this would be appreciated.

This is what I have so far:
=query('Donors & Sponsors'!A4:H, "select A, sum(F) where A <> '' and date '" & text(B1, "yyyy-mm-dd") & "' <= toDate(C) and toDate(C) <= date '" & text(C1, "yyyy-mm-dd") & "' group by A label A 'Name', sum(F) 'Total contribution' ",1)

This gives me a list of donors that gave a year ago but does not exclude any people have donated more recently.  I cannot figure out how to do that.  Someone please help.