View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
TomHinkle TomHinkle is offline
external usenet poster
 
Posts: 36
Default Referencing a cell, not the value

I'm hoping you've just been looking at it too long

objSht.Cells(Row, "U").Formula = "=" & objsht.Range("B5").value & " & "*
Q" & Row & ""


"BerkshireGuy" wrote:



I have the following line in some VBA:

objSht.Cells(Row, "U").Formula = "=477" & "* Q" & Row & ""

This line basically sets the formula for all of column U for as many
rows as there are. It works great.

However, suppose if I had a worksheet called "Data" and in that
worksheet I had a cell lets say B1 and in that cell is the 477 figure.


How can I make this dynamic? Meaning, if the user changes the 477 to
577, I want all of the formulas referencing that cell to update
properly?


Thanks,
Brian