LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Combining R1C1 and absolute reference in SUMPRODUCT in VBA

I am having trouble figuring out how to write a SUMPRODUCT formula in VBA
that multiples an array of cells which I would like to reference in relative
R1C1 terms by an array of cells that I would like to reference in absolute
terms on another sheet. The first part of my formula is fine, but I want the
cells from the DI_NAM sheet to always refer to rows 5 to 9. The column must
be the same as the first array. If there is a way I could put a variable
into the reference, that would work, but I can't figure out how to do this.
I need to replicate this formula as part of a block of data that gets created
in a do loop.

Selection.FormulaR1C1 = "=SUMPRODUCT(R[-7]C:R[-3]C,DI_NAM!R[-17]C:R[-13]C)"

This formula gets input across 36 columns as I am working with 36 months of
data.

I am a novice at VBA, so if anyone knows how to do this, I would really
appreciate the help!

 
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 reference Rick Excel Discussion (Misc queries) 4 March 26th 10 11:24 PM
Absolute cell reference will not remain absolute. Mike K Excel Worksheet Functions 1 October 8th 08 07:12 PM
R1C1 reference Tony S Excel Discussion (Misc queries) 1 May 10th 05 05:58 PM
Combining absolute and relative reference for sum Denise Excel Programming 1 November 4th 04 06:34 AM
Absolute reference in R1C1 notation Tim C Excel Programming 2 August 14th 03 11:54 PM


All times are GMT +1. The time now is 12:18 AM.

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"