Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculate the result of an array in vba
For Each c In Range("A2", Range("A2").End(xlDown))
I would like vba to enter the result of the following array formula into column P in each row: {=SUM((A$2:A$1000=A2)*(F$2:F$1000=F2)*G$2:G$1000)} I would like to do this without actually entering the formula -- only the value. Any help would be appreciated. Thanks, Sam |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculate the result of an array in vba
I'd add the formulas and then convert them to values.
If you blink, you may not even notice the formulas! Option Explicit Sub testme() Dim myRng As Range With ActiveSheet Set myRng = .Range("p2:p" & .Range("a2").End(xlDown).Row) End With With myRng .Formula = "=SUMproduct((A$2:A$1000=A2)*(F$2:F$1000=F2)*G$2:G $1000)" .Value = .Value End With End Sub Sam wrote: For Each c In Range("A2", Range("A2").End(xlDown)) I would like vba to enter the result of the following array formula into column P in each row: {=SUM((A$2:A$1000=A2)*(F$2:F$1000=F2)*G$2:G$1000)} I would like to do this without actually entering the formula -- only the value. Any help would be appreciated. Thanks, Sam -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with excel array - select, add and calculate result | Excel Worksheet Functions | |||
Calculate time, but if less then hrs, end result must be 1 hrs | New Users to Excel | |||
Query on how I would calculate a result in Excel? | Excel Worksheet Functions | |||
find each of the items in an array and save result in another array | Excel Programming | |||
compare two columns, then calculate a result | Excel Discussion (Misc queries) |