montecarlo2012
Well-known Member
- Joined
- Jan 26, 2011
- Messages
- 986
- Office Version
- 2010
- Platform
- Windows
Hi.
I am trying to loop the frequency function and I didn't get right
the code I write is:
Is wrong, so this is the macro to illustrate what I am trying to do:
thanks.
I am trying to loop the frequency function and I didn't get right
the code I write is:
VBA Code:
Sub LO_FRE()
Dim i As Long, j As Long
For i = 2 To 54
For j = 10 To 52
Cells(i, j + 1).FormulaArray = "=frequency(R2C" & i & ":R54C" & i & ", R10C1:R52C1))"
Next
Next
End Sub
Is wrong, so this is the macro to illustrate what I am trying to do:
VBA Code:
Sub Macro_1()
Range("J2:J54").FormulaArray = "=FREQUENCY(B2:G5,I2:I54)"
Range("K2:K54").FormulaArray = "=FREQUENCY(B2:G6,I2:I54)"
Range("L2:L54").FormulaArray = "=FREQUENCY(B2:G7,I2:I54)"
Range("M2:M54").FormulaArray = "=FREQUENCY(B2:G8,I2:I54)"
Range("N2:N54").FormulaArray = "=FREQUENCY(B2:G9,I2:I54)"
' and from here until ........................
Range("AZ2:AZ54").FormulaArray = "=FREQUENCY(B2:G46,I2:I54)"
End Sub