Dear forum members,
Thank you so much for taking the time to read this. I work for a science research lab and am trying to change some code that was written by someone before me in order to analyze thousands of data sets that would take forever to do by hand. I am hoping one of the very brilliant people on here may be able to help me.
Currently the code that I have takes an x # of cells (variable is called numTrPSess) and sums them together and then writes that sum into the cell of a new sheet.
Rather than summing the number of cells defined by numTrPSess I need a different function calculated. numTrPSess needs to be a constant of 3 and I need those 3 cells to be calculated as such:
(Cell1 - Cell3)*(Cell1)
So for something like cells A1,A2,A3 with values of 6,5,4 respectively, I would need this macro to do (A1 - A3)*(A1) and therefore print out the value of (6 - 4) * (6) = 12.
Here is my current code: http://pastie.org/1035435
Thank you so much to anyone who can provide any assistance!
Bookmarks