Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Sumproduct with A1 notation instead of R1C1

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Sumproduct with A1 notation instead of R1C1

Hi

Look at this:

TargetRange = "A1:A6"
MyCondition = "Per"
Range("C2").Formula = "=sumproduct(--(" & TargetRange & "=""" _
& MyCondition & """),B1:B6)"


Regards,
Per

"sgltaylor" skrev i meddelelsen
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
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



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
R1C1 Notation in VBA Fred Holmes Excel Programming 1 October 21st 05 09:33 PM
Using Range with R1C1 notation in a macro J Excel Programming 1 January 23rd 04 04:46 AM
Absolute reference in R1C1 notation Tim C Excel Programming 2 August 14th 03 11:54 PM
R1C1 Notation brym Excel Programming 4 July 27th 03 09:47 PM


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

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

About Us

"It's about Microsoft Excel"