![]() |
Referencing a cell, not the value
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 |
Referencing a cell, not the value
Try this.
objSht.Cells(Row, "U").Formula = "=Data!$B$1" & "* Q" & Row & "" Regards, Jayant |
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 |
Referencing a cell, not the value
Awesome!
This newbie thanks you! -Brian |
All times are GMT +1. The time now is 10:48 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com