Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default cell refs in formula

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default cell refs in formula

On 28 Apr, 04:57, "Boba" 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default cell refs in formula

Perfect. Thanks for the lesson.


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
Can Formula Auditing give cell refs to other sheets? [email protected] New Users to Excel 4 October 24th 07 03:56 PM
auto-hide rows, cell format (# and @), update cell refs, shade cel Mo2 Excel Discussion (Misc queries) 0 April 17th 07 03:44 AM
Why would a pasted formula not calculate the new cell refs? Alison Excel Worksheet Functions 2 April 1st 06 09:55 PM
Copying a formula with different sheet refs JG Excel Discussion (Misc queries) 0 April 1st 05 08:51 AM
Variable Cell Refs Craig[_15_] Excel Programming 2 April 28th 04 04:04 PM


All times are GMT +1. The time now is 06:45 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"