The things you ask are very simple to do, but you need to explain yourself better, in your code you want the formula to be put in to D37, you the overwrite D7, so how do you want to place the formula? should it be in column D last unused cell then down for 20 rows?