PC Review


Reply
Thread Tools Rate Thread

cell refs in formula

 
 
Boba
Guest
Posts: n/a
 
      28th Apr 2007
Dear All;
How do I reference cells in formulas?
I need an example of VB macro that fills up
the cell range C1000:C2000 with formulas
so they show pairwise sums of A2000:A3000
and B3000:B4000 cells
//from C++
for(int i=0; i<1000; i++)
cellC[i+1000]=cellA[i+2000]+cellB[i+3000]
Thanks in advance.


 
Reply With Quote
 
 
 
 
Dave Mac
Guest
Posts: n/a
 
      28th Apr 2007
On 28 Apr, 04:57, "Boba" <B...@somewhere.world> wrote:
> Dear All;
> How do I reference cells in formulas?
> I need an example of VB macro that fills up
> the cell range C1000:C2000 with formulas
> so they show pairwise sums of A2000:A3000
> and B3000:B4000 cells
> //from C++
> for(int i=0; i<1000; i++)
> cellC[i+1000]=cellA[i+2000]+cellB[i+3000]
> Thanks in advance.


try....

Range("C1000").FormulaR1C1 = "=SUM(RC[-2]:RC[-1])"
Range("C1000").AutoFill Destination:=Range("C1000:C3000"),
Type:=xlFillDefault

 
Reply With Quote
 
Boba
Guest
Posts: n/a
 
      28th Apr 2007
Perfect. Thanks for the lesson.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Formula Auditing give cell refs to other sheets? baobob@my-deja.com Microsoft Excel New Users 4 24th Oct 2007 03:56 PM
auto-hide rows, cell format (# and @), update cell refs, shade cel =?Utf-8?B?TW8y?= Microsoft Excel Misc 0 17th Apr 2007 03:44 AM
Why would a pasted formula not calculate the new cell refs? =?Utf-8?B?QWxpc29u?= Microsoft Excel Worksheet Functions 2 1st Apr 2006 09:55 PM
Converting RC cell refs to cell range refs David Ralph Microsoft Excel Misc 2 15th Dec 2003 04:21 PM
Cell refs and VBA DavidObeid Microsoft Excel Misc 8 8th Dec 2003 07:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:55 AM.