Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The first two sub procedures below work OK
The third one however, produces a Type Mismatch error. Do VBA Array formulas not accept variable arguments or am I miss-keying something? All help gratefully accepted. :-) Dim rep As String Dim pco As String Sub addpco() Range("K1") = "005522" Range("L1") = "PRI" rep = "005522" pco = "PRI" TotalPRI = [Sum((A2:A14=K1)*(D2:D14=L1)*(G2:G14))] MsgBox TotalPRI TotalPRI = [Sum((A2:A14="005522")*(D2:D14="PRI")*(G2:G14))] MsgBox TotalPRI TotalPRI = [Sum((A2:A14=rep)*(D2:D14=pco)*(G2:G14))] MsgBox TotalPRI End Sub Thanks in Anticipation John Howard Sydney, Australia |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Array formula: how to join 2 ranges together to form one array? | Excel Worksheet Functions | |||
IF or Array formula excel .. help ! | Excel Worksheet Functions | |||
array or IF formula excel help | Excel Discussion (Misc queries) | |||
Tricky array formula issue - Using array formula on one cell, then autofilling down a range | Excel Programming | |||
Excel XP Sum Array Formula | Excel Programming |