Dynamically create a formula in Sheet B referencing SheetA
I am writing a scheduling program. What I want to do, through VBA, is to
create a formula in Sheet B that references a cell in Sheet A. In essence I want to put a formula: =MASTER!B15 in a cell in Sheet B through VBA so that if the value in Sheet A changes, the value in Sheet B will also change. I cannot simply create the formula in Sheet B because Sheet A changes dynamically. Thanks in advance for any help. -- M. Shipp |
Dynamically create a formula in Sheet B referencing SheetA
try
sheets("destination").range("b1").value=sheets("so urce").range("b1") -- Don Guillett SalesAid Software "SHIPP" wrote in message ... I am writing a scheduling program. What I want to do, through VBA, is to create a formula in Sheet B that references a cell in Sheet A. In essence I want to put a formula: =MASTER!B15 in a cell in Sheet B through VBA so that if the value in Sheet A changes, the value in Sheet B will also change. I cannot simply create the formula in Sheet B because Sheet A changes dynamically. Thanks in advance for any help. -- M. Shipp |
Dynamically create a formula in Sheet B referencing SheetA
Those are fixed positions. I need dynamic so that the b1 changes. Some type
of loop I assume. Thanks but it doesn't fit the bill. "Don Guillett" wrote: try sheets("destination").range("b1").value=sheets("so urce").range("b1") -- Don Guillett SalesAid Software "SHIPP" wrote in message ... I am writing a scheduling program. What I want to do, through VBA, is to create a formula in Sheet B that references a cell in Sheet A. In essence I want to put a formula: =MASTER!B15 in a cell in Sheet B through VBA so that if the value in Sheet A changes, the value in Sheet B will also change. I cannot simply create the formula in Sheet B because Sheet A changes dynamically. Thanks in advance for any help. -- M. Shipp |
Dynamically create a formula in Sheet B referencing SheetA
For i = 1 To 10 Worksheets("Sheet B").Cells(i,"B").Formula = "=MASTER!B" & i Next i -- HTH RP (remove nothere from the email address if mailing direct) "SHIPP" wrote in message ... Those are fixed positions. I need dynamic so that the b1 changes. Some type of loop I assume. Thanks but it doesn't fit the bill. "Don Guillett" wrote: try sheets("destination").range("b1").value=sheets("so urce").range("b1") -- Don Guillett SalesAid Software "SHIPP" wrote in message ... I am writing a scheduling program. What I want to do, through VBA, is to create a formula in Sheet B that references a cell in Sheet A. In essence I want to put a formula: =MASTER!B15 in a cell in Sheet B through VBA so that if the value in Sheet A changes, the value in Sheet B will also change. I cannot simply create the formula in Sheet B because Sheet A changes dynamically. Thanks in advance for any help. -- M. Shipp |
All times are GMT +1. The time now is 08:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com