Evaluate specific row of table

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Evaluate specific row of table

Post by jstevens »

Is it possible to evaluate the sumproduct of a specific table row using VBA?

I know that "@" will evaluate the ActiveCell in the table correctly. I would like to evaluate a specific row in a table; let's use row 3 as an example.

MsgBox Evaluate("=SUMPRODUCT(ABS(tblMyTable[@[January]:[December]]))")
Regards,
John

User avatar
HansV
Administrator
Posts: 78418
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Evaluate specific row of table

Post by HansV »

Like this:

Code: Select all

MsgBox Evaluate("=SUMPRODUCT(INDEX(ABS(tblMyTable[[January]:[December]]),3,0))")
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Evaluate specific row of table

Post by jstevens »

Hans,

:clapping:

Thank you!
Regards,
John