Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use SUMPRODUCT in macro?
Dear all,
Now I m just testing and learned about SUMPRODUCT parameter of excel. But actually, I need to translate and applicate in macro(i need the syntax). So I can't solve it now! Anyone can help me and feel greatly appreciate ! -- Regards, Tarek ^^' ----------------------- Tarek's WorkShop |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use SUMPRODUCT in macro?
Easiset way
Debug.Print Evaluate("SUMPRODUCT(--(A1:A10=""abc""),--(B1:B10=17),C1:C10)") -- HTH RP (remove nothere from the email address if mailing direct) "Tarek" wrote in message ... Dear all, Now I m just testing and learned about SUMPRODUCT parameter of excel. But actually, I need to translate and applicate in macro(i need the syntax). So I can't solve it now! Anyone can help me and feel greatly appreciate ! -- Regards, Tarek ^^' ----------------------- Tarek's WorkShop |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use SUMPRODUCT in macro?
Dear You,
Is use this to put SUMPRODUCT in Vba's Macro : ActiveSheet.Range("A1").Select ActiveCell.FormulaR1C1Local = "=SUMPRODUCT(('C1:C10 = 1)*(D1:D10 = "Ya"))" And if you put only the result on the sheet: ActiveCell.Value = ActiveCell.Value "?B?VGFyZWs=?=" wrote in : Dear all, Now I m just testing and learned about SUMPRODUCT parameter of excel. But actually, I need to translate and applicate in macro(i need the syntax). So I can't solve it now! Anyone can help me and feel greatly appreciate ! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use SUMPRODUCT in macro?
"Cora" wrote in message ... Is use this to put SUMPRODUCT in Vba's Macro : ActiveSheet.Range("A1").Select ActiveCell.FormulaR1C1Local = "=SUMPRODUCT(('C1:C10 = 1)*(D1:D10 = "Ya"))" I think you must mean ActiveCell.Formula = "=SUMPRODUCT((C1:C10 = 1)*(D1:D10 = ""Ya""))" |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use SUMPRODUCT in macro?
"Bob Phillips" wrote in news:e7d9J
: ActiveCell.FormulaR1C1Local = "=SUMPRODUCT(('C1:C10 = 1)*(D1:D10 = "Ya"))" No ActiveCell.Formula = "=SUMPRODUCT((C1:C10 = 1)*(D1:D10 = ""Ya""))" Didn't work (#Name? appears in cell) ActiveCell.FormulaR1C1Local = "=SUMPRODUCT((C1:C10 = 1)*(D1:D10 = ""Ya""))" Give the good result |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use SUMPRODUCT in macro?
Odd.
Can you try this for me? ActiveCell.Formula = "=SOMMEPROD((C1:C10 = 1)*(D1:D10 = ""Ya""))" -- HTH RP (remove nothere from the email address if mailing direct) "Cora" wrote in message ... "Bob Phillips" wrote in news:e7d9J : ActiveCell.FormulaR1C1Local = "=SUMPRODUCT(('C1:C10 = 1)*(D1:D10 = "Ya"))" No ActiveCell.Formula = "=SUMPRODUCT((C1:C10 = 1)*(D1:D10 = ""Ya""))" Didn't work (#Name? appears in cell) ActiveCell.FormulaR1C1Local = "=SUMPRODUCT((C1:C10 = 1)*(D1:D10 = ""Ya""))" Give the good result |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use SUMPRODUCT in macro?
"Bob Phillips" wrote in
: Odd. Can you try this for me? ActiveCell.Formula = "=SOMMEPROD((C1:C10 = 1)*(D1:D10 = ""Ya""))" Hello, I've already try this formula. The result appear only when I edit cell with F2 and Enter (I refer cells in an another workbook who is open in the same macro). When I use FormulaR1C1Local the result appear immediately. bye |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SumProduct not Working in a Macro | Excel Worksheet Functions | |||
Sumproduct with Condition OR Sumproduct with ADDRESS function - HE | Excel Discussion (Misc queries) | |||
SUMPRODUCT macro | Excel Discussion (Misc queries) | |||
Conditional SUMPRODUCT or SUMPRODUCT with Filters | Excel Worksheet Functions | |||
sumproduct? sumif(sumproduct)? | Excel Worksheet Functions |