Most valuable professional
  • Hot Topics

Excel Formulas with variables stored in different models return all values as zero

Hello, I have a fairly complex mathematical model where variables and its value are currently stored in three modules. If I use a formula where the variables are stored in the same module, the formula will return the correct value. However, if I call up a value from a different module to module 3, the formula will always return a value of 0. For example, in module 1, I have executed the procedure: PotentialWagesGroup1 = 750 Worksheets(1).Range("D10").Value = PotentialWagesGroup1 In module 2 FullTimeWagesGroup1Year1 = GrowthRate ^ 0 * PotentialWagesGroup1 Worksheets(1).Range("J3").Value = FullTimeWagesGroup1Year1 Then in module 3 BeforeTaxIncomeGroup1Year1 = FullTimeWagesGroup1Year1 Worksheets(1).Range("Z71").Value = BeforeTaxIncomeGroup1Year1 All variables in this example are declared as public variables as double Cell D10 reads 750 Cell J3 reads 750 but Cell Z71 reads 0

This question generated 9 answers. To proceed to the answers, click here.

This thread is current as of October 11, 2014.

For more resources for Microsoft Excel:

This article includes the following tags:

  • Excel
  • Microsoft Excel