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: 1,388
Default Variable excel formula


For I = 1 To count


ActiveCell.FormulaR1C1 = "=RC[-2] - R13C12"


ActiveCell.Offset(1, 0).Select

Next I

This loop is used to fill in the delay for all the female parent rows.
"Count" is the number of female rows. The formula calculates the value of the
cell two to the left of the active cell (the female parent GDU, this value
changes in each record) minus the value in cell R13C12 (male parent GDU, all
males are the same so this GDU value stays the same. I don't have the same
number of males and females so this part of the formula has to be an absolute
reference).

I run this calcuation for blocks of records. When I finish one block I loop
through the male parents in that block, find the count of female parents in
the next block and want to go back to the above section, but with the correct
reference for the male parent GDU, which will no longer be R13C12.

 
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
Excel Named Formula Weakly Interacts with a Variable Range on the Worksheet - Re-Visit [email protected] Excel Discussion (Misc queries) 5 September 6th 07 06:42 PM
Variable in Excel Sum formula KMR Excel Discussion (Misc queries) 2 March 27th 06 08:57 PM
entering formula using variable in Excel Macro doc-s Excel Programming 1 August 18th 04 08:27 PM
Including a variable number of columns in Excel Sum formula Richard Buttrey[_5_] Excel Programming 1 July 7th 04 10:29 AM
Excel VBA-use variable in active cell formula problem waveracerr Excel Programming 9 February 6th 04 02:49 PM


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