Using Two Variables in Excel Calculation VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Having trouble getting correct syntax. Using two inputted variables
TotSalesDay and CurrSalesDay - need to calculate in cell

ActiveCell.FormulaR1C1 = "=RC[-2] / TotSalesDay * CurrSalesDay
 
ActiveCell.FormulaR1C1 = "=RC[-2] / " & TotSalesDay & " * " &
CurrSalesDay

HTH

Charles
 
Back
Top