jared wrote:No charitable deduction because no property or cash is being donated.
I agree with this and just had a similar conversation with my accountant. I am a sole prop. and charge $X amount for services. A neighbor is ill and I provided services to her for free. I am unable to write off what money I would have earned had I filled her time slot with a paying customer.
However, you got the same benefit as if you had a tax deduction; you didn't earn the $X, so you don't pay tax on it. If you instead charged her the regular $X, but donated the $X to a charity which happened to pay her expenses, you would have the same taxable income. (The IRS will not allow a charitable deduction for the benefit of a single individual, so the equivalence doesn't work out if you gave her the $X directly, or gave it to a charity with the specification that it be given to her.)
The OP is in the same situation. If he sold the ad space for $1000 and donated $1000 to the charity, he would have no net income, and the charity could then buy the ad space at the regular $1000 rate. Instead, he will give the ad space to the charity and have no net income from the deal.