The full s/s stretches to nearly 350,000 rows and consists of over 20,000 series of data, between 6 and 30 rows deep, in columns A:J.
In column I of each series, on rows 3, 4 and 5 there are three numbers.
The second number is to be subtracted from the first with the answer being divided by the third.
If possible, the answers should appear in the rows directly beneath these three numbers.
Because there are so many series of data it isn't feasible to manually input the formula and I'm searching for a macro(s) which can do it automatically.
Can anyone please suggest code to help me to this end??
Big thanks.
colwyn.
Lets see if I've got this right. You only need to work with the rows 3,4 and 5 with the result in row 6.
Try this (created by using the record macro function.)
The only thing you need to change is the value AO6 in the second range select statement to the value in the last last column. It's a quick and simple macro, but it works.
You might want to investigate how to make line 3 into a current cell select statement. then you won't need to enter the last data column reference.
Sub FillFormulaRight()
'
' FillFormulaRight Macro
' Macro recorded 25/06/2009 by David Wood
'
Range("A5").Select
Selection.End(xlToRight).Select
Range("AO6").Select
Range(Selection, Selection.End(xlToLeft)).Select
Selection.FillRight
End Sub
hope this is of some help
Dave
Discuss This Question: 2  Replies