LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Divide by variable

Ok, maybe I am not googling correctly (and by no means am I a VBA
guru) but I need help with what seems like a very basic problem.. I
am trying to pass a variable into a formula and it is interpreting it
as text, not the variable value.. See below for relevent code...

DIM VAR1 as integer

ActiveCell.FormulaR1C1 = "=(RC[-31]+RC[-27])/VAR1

VAR1 is being incremented in a loop and I have verified it has a value
but instead of dividing by 3 for instance it is trying to divide by
VAR1.

Can someone hold my hand and let me know what rookie mistake I am
making???

 
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
variable height variable width stacked bar charts ambthiru Charts and Charting in Excel 3 January 18th 06 11:41 PM
variable in a link where the variable is the name of the sheet darrelly Excel Worksheet Functions 1 October 7th 05 08:24 AM
Sum cells based on a row variable and seperate column variable CheeseHeadTransplant Excel Worksheet Functions 10 September 23rd 05 06:59 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Divide one row over other row I dont wont to divide one number Rick Excel Discussion (Misc queries) 0 March 4th 05 07:13 PM


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