Good afternoon all,
I have a repetitive task that I am trying to see about automating.
In many spreadsheets with many imports of different types of data, I have to perform a simple differencing calculation abs((Current Year)-(Prior Year)) I would like to be able to use a macro which will take a formula of this form:
And paste it into a selected column of cells.![]()
=ABS(OFFSET(E2,0,-2)-OFFSET(E2,0,-1))
For example, in the import of data, I may have to do this calculation for 3 columns of data. I want to be able to select a range and run a macro which will insert the formula into the range of cells and calculate an absoulte value difference for each row/record. I've thusly scrapped all of the macros I've tried recording/tweaking to make this work. Also, not sure if this is important, but the offset is not always E2. That is just the example. I want the offset function to be self-referencing to the cell it is located in. Please let me know if I've confused you, I appreciate your assistance!
Bookmarks