I'm trying to assign formulas to cells to sum values from a column based on the group that those values belong to. I tried putting the formula directly on the cells but the ranges in the formula kept changing every time I ran my macro so I decided to have the formulas in my VBA code. However, whenever I try to run it, it gives me a error 1004. I'm using excel version 1908 excel proplus. I'd appreciate any help with trying to get rid of this error in my vba code or trying to get the formula in the cells to not change range whenever the macro runs. I put my desired sample output in the sheet called line 1. Thanks in advance.
Bookmarks