How can I reference a cell from a different cell
How can I reference a cell from a different cell开发者_如何学Go?
For eg:
I want to reference Cell A1 = B1, But dont want any formulas/logic in Cell A1. The formula/logic can be in any other cell.
How can I do this?
If you want to change a cell value without having a formula in the same cell, you'll likely need to use VBA. For example:
At Wrox Programmer-to-Programmer, Maccas posts the following example:
Sub UpdateVal()
ActiveSheet.Range("A5").Value = ActiveSheet.Range("B5").Value
End Sub
One question that comes to mind however, is why you don't want a formula in cell A1?
Something like =IF(some_condition, B1, "")
would leave cell A1 blank unless it met some condition, but populate it with B1's value otherwise.
精彩评论