I have this nasty formula:
=SUMPRODUCT(('T-RECS'!$D$2:$D$5000-DAY('T-RECS'!$D$2:$D$5000)+1=DATE(YEAR('CENTRAL DIVISION-2007'!K$14),MONTH('CENTRAL DIVISION-2007'!K$14),1))*('CENTRAL DIVISION-2007'!$A15='T-RECS'!$A$2:$A$5000)*('T-RECS'!$C$2:$C$5000)).
I have been using ctrl c and v and d to copy and paste and fill this formula down where I need it. But I was hoping a macro could do it for me. The trick is that I need it in certain columns. The rows never change.
for example I need the fomula in rows 15-30, 50-63, 82-95, etc. and in Col. K this time. But next time I need it in Col M.,same rows. So, I was hoping for a macro that would ask me what column I need it in, and then automatically enter it in the rows I need. There are many rows so I would want to pre set those in the code, and only have to choose the column each time. Also, the formula would have to keep its references correct. So, if I choose col. M to paste in then I would need the formula to reference m$14 for the date. Like wise if one of the cells was M50, I would need the formula ref to be $A50.
This macro would be an amazing time saver.
Thank you very much for your time and help.
Bookmarks