I am attempting to create a payment schedule for about 14 accounts. Right now, I have the accounts running from B2:B15, the corresponding balances in C2:C15, Payment date (day of month) in D2:D15 with the dates running along in Row 1 (starting from D1. I want to find a formula that follows this logic [if date (row 1) has day of month that matches payment date (column D), then balance-payment. So in the table I crudely recreated below, the formula would go in E2:E6 (and copied across) and if the day of the month matched the payment date (cells with *) it would insert the payment (which would be a saved definition from another location)

I have been trying to use IF formulas but I have no clue how to get it ti recognize a date and then determine that I care about the day of the month, not the full date.

A B C D E F G H
1 ACCOUNT BALANCE PAYMENT DATE 6/18/2014 6/19/2014 6/20/2014 6/21/2014
2 XYZ 1000 15
3 I LOVE PIE 2465.15 12
4 ETC 946.73 18 *
5 SO ON 654 19 *
6 YADA YADA 157641 20 *