I am looking for a code that does the following in a data set with headings & with a dynamic number of rows (Using existing data in column B to indicate where the last row is);
--- Cell range J2 to last row in column J to be populated with the formula =G2-I2 in row 2, =G3-I3 in row 3 all the way to the last row
--- Cell range M2 to last row in column M to be populated with the formula =if(K2="",G2,K2) in row 2, =if(K3="",G3,K3) in row 3 all the way to the last row
--- Cell range O2 to last row in column O to be populated with the formula =M2-I2 in row 2, =M3-I3 in row 3 all the way to the last row
--- Cell range P2 to last row in column P to be populated with the formula =SUM(E2:F2) in row 2, =SUM(E3:F3) in row 3 all the way to the last row
--- Cell range Q2 to last row in column Q to be populated with the formula =E2*O2/100 in row 2, =E3*O3/100 in row 3 all the way to the last row
--- Cell range R2 to last row in column R to be populated with the formula =F2*O2/100 in row 2, =F3*O3/100 in row 3 all the way to the last row
--- Cell range S2 to last row in column S to be populated with the formula =Q2+R2 in row 2, =Q3+R3 in row 3 all the way to the last row
Thank you
--- Cell range J2 to last row in column J to be populated with the formula =G2-I2 in row 2, =G3-I3 in row 3 all the way to the last row
--- Cell range M2 to last row in column M to be populated with the formula =if(K2="",G2,K2) in row 2, =if(K3="",G3,K3) in row 3 all the way to the last row
--- Cell range O2 to last row in column O to be populated with the formula =M2-I2 in row 2, =M3-I3 in row 3 all the way to the last row
--- Cell range P2 to last row in column P to be populated with the formula =SUM(E2:F2) in row 2, =SUM(E3:F3) in row 3 all the way to the last row
--- Cell range Q2 to last row in column Q to be populated with the formula =E2*O2/100 in row 2, =E3*O3/100 in row 3 all the way to the last row
--- Cell range R2 to last row in column R to be populated with the formula =F2*O2/100 in row 2, =F3*O3/100 in row 3 all the way to the last row
--- Cell range S2 to last row in column S to be populated with the formula =Q2+R2 in row 2, =Q3+R3 in row 3 all the way to the last row
Thank you