View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Sumproduct with A1 notation instead of R1C1

Activecell.Formula = "=SUMPRODUCT(--(A2:A20="value1"),--(B2:B20=17))

or

Set rng1 = Range("A2:A20")
Set rng2 = Range("B2:B20")

Activecell.Formula = "=SUMPRODUCT(--(" & rng1.Address & "),--(" &
rng2.Address & "))"


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"sgltaylor" wrote in message
...
Hi,

I would appreciate some help with the following. I am trying to enter
a sumproduct formula in VBA but using A1 notation instead of R1C1.
Could you someone provide me with an example.

Thanks