Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to implement the following, but just couldn't figure out why I keep getting a runtime error 1004 on Unable to set FormulaArray Property of the Range Class. Can anyone enlighten me please? Thanks! Dim NumRows As Integer Dim NumBins As Integer Dim ICol As Integer Dim IRow As Integer Dim sRngCol As String Dim sRngR As String Dim sRngC As String Dim sRngLot As String For IRow = 2 To NumRows For ICol = 1 To NumBins sRngCol = "rngCol" & ICol + 4 sRngR = "R" & IRow sRngC = "C" & ICol sRngLot = sRngR & sRngC ActiveSheet.Cells(IRow, ICol).FormulaArray = _ "=AVERAGE(IF(rngCol1='" & sRngLot & ",'" & sRngCol & "))" Next ICol Next IRow |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime error 1004 | Excel Discussion (Misc queries) | |||
runtime error 1004 | Excel Discussion (Misc queries) | |||
Runtime Error '1004' | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
Runtime error 1004 | Excel Programming |