Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SumProduct not Working in a Macro Booey Excel Worksheet Functions 6 March 18th 10 09:13 AM
Sumproduct with Condition OR Sumproduct with ADDRESS function - HE gholly Excel Discussion (Misc queries) 2 September 28th 09 05:07 PM
SUMPRODUCT macro Kim Excel Discussion (Misc queries) 2 September 21st 09 04:36 PM
Conditional SUMPRODUCT or SUMPRODUCT with Filters Ted M H Excel Worksheet Functions 4 August 14th 08 07:50 PM
sumproduct? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM


All times are GMT +1. The time now is 12:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"