Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() What would be the proper syntax to have VBA to insert an array formul in a cell? For example: SheetData.Range("F4") = "=SUM(F7:F70)" inserts the formula. However, the following does not work, SheetData.Range("E4") = "{=SUM(--SUBSTITUTE(0 & E7:E70, " - ",""))}" Any ideas. Thanks for all your help. mikebur -- mikebur ----------------------------------------------------------------------- mikeburg's Profile: http://www.excelforum.com/member.php...fo&userid=2458 View this thread: http://www.excelforum.com/showthread.php?threadid=50667 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mike
You need to use the FormulaArray function This code should work : Range("E4").FormulaArray = "=SUM(--SUBSTITUTE(0 & R[3]C:R[66]C, "" - "",""""))" Thanks Karthik Bhat |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
From Help:
Worksheets("Sheet1").Range("E1:E3").FormulaArray = _ "=Sum(R1C1:R3C3)" Tim "mikeburg" wrote in message ... What would be the proper syntax to have VBA to insert an array formula in a cell? For example: SheetData.Range("F4") = "=SUM(F7:F70)" inserts the formula. However, the following does not work, SheetData.Range("E4") = "{=SUM(--SUBSTITUTE(0 & E7:E70, " - ",""))}" Any ideas. Thanks for all your help. mikeburg -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=506670 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks so very much. mikeburg -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=506670 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Array Formula Syntax question... | Excel Discussion (Misc queries) | |||
Why hlookup error when I insert table array formula? | Excel Discussion (Misc queries) | |||
unable to solve array formula syntax | Excel Worksheet Functions | |||
How do I always insert last cell from a increasing array ? | Excel Worksheet Functions | |||
Tricky array formula issue - Using array formula on one cell, then autofilling down a range | Excel Programming |