I don’t really know much about excel especially VBA. But i need to write something(macro for ex.) that does the following:
if someone inserts a row and fills the first 4 cells of it, it needs to sort the rows (i have a macro for sorting called “sortingmacro”) and then it needs to fill cells 7 and 8 by copying the cells above them.
for example if i insert a row to 4th line and fill A4,B4,C4 and D4 it needs to copy G3 to G4 and H3 to H4. (after sorting of course)
any help is appreciated.
edit:
i have formulas in the cells that are to be copied. the formulas for the first row(the top one according to sorting) is a different one and all the others are the same.
So put a button on the page, then go to the code for it (the click event). In that, use your sortingmacro to sort all the rows. Then you just do something simple like:
Of course instead of hardcoding 4 in there, you’d have a variable for the row (make sure and determine it after sorting).