Im working on a budget and financial calculator

Ive already got it set up to calculate my pay and deduct taxes and all my bill and tell me how much i have left at the end of the month, now im trying to get it set up to tell me how much will be left out of each check i get based on what day my bills are due

Essentially what i want is I7 is the cell for my first check of the month and K7 is my second check, Collumn H shows my due dates for each bill, collumn A is the price on each bill so what i want is something that is similar to

If the value if column H is between 5 and 19 then deduct the price in column a from I7 (wwith H and A being the same row) and if the value of column H is 1-4 or 20-31 then deduce the value in column A (with H and A being the same row) from K7

another way to put it would be I7 gets duducted the value in column A if column H is between 4-19 otherwise do nothing (with H and A having same row)
deduct the value in Column A from K7 if column H is between 1-4 or 20-31 otherwise do nothing