View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Matthew Dyer Matthew Dyer is offline
external usenet poster
 
Posts: 178
Default writing formula w/ variables

On Jun 30, 1:24*pm, Matthew Dyer wrote:
This should be a simple solution but I can't figure it out... Here is
the line of code I'm having issues with -

* * .Formula = "=(((COUNT(b:b)+" & var1 & ")*5)-SUM(b:c))/" & var1 &"

Why isn't this working for me? I used the same basic "& _ &" roadmap
in the following code with no problem

Range("H7").Value = "In " & var1 & " Days:"


I used a workaround where I just put the value of var1 in a cell and
referanced the cell instead of the variable, but I would definatley
appreciate anyone who could tell me what I'm doing wrong... Thanks!!!