hi! i'm trying to take the average of the Salary(Column C) for every Category(Column A) with respect to Duration(Column D) as shown below.
To get the average of Category A, my formula will look like this:
=(C2*D2)/SUM($D$2:$D$5)+(C3*D3)/SUM($D$2:$D$5)+(C4*D4)/SUM($D$2:$D$5)+(C5*D5)/SUM($D$2:$D$5)
Attachment 355377
Attachment 355377
now, the problem is if i'm going to insert another row, i need to revise the formula everytime.
can someone help me to use maybe VLOOKUP and then make it loop to achieve what i want? so that even if i insert another row, it will just add that row to the formula since it uses VLOOKUP?
then, i can remove Columns E & F and replace it with that formula.
thanks for your help!
Bookmarks