Feb 05 2023 01:07 PM
How can I have excel automatically copy the changes in a cell that has formulas into one that doesn't? For example, I have a formula on D18. Every time this value changes in D18 I want it to be updated in cell D4.
I would need this to be explained to me as if I were a child since I am no expert in Excel. Thank you
Feb 05 2023 01:14 PM
The easiest way to do this, is to enter the formula
=D18
in cell D4.
If you don't want a formula in D4 for some reason, you'll need VBA code.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrHandler
If Not Intersect(Range("D18"), Target) Is Nothing Then
Application.EnableEvents = False
Range("D4").Value = Range("D18").Value
End If
ExitHandler:
Application.EnableEvents = True
Exit Sub
ErrHandler:
MsgBox Err.Description, vbExclamation
Resume ExitHandler
End Sub
Feb 05 2023 02:08 PM
Hi, @Hans Vogelaar
Thank you for your prompt response. I actually found a baby way to do it. I right-clicked on cell D18 (the one with the formula) and pasted it with the "paste link" option in cell D4 and the trick worked. I did it with all the other cells I wanted and it was magic.
I appreciate this. Maybe I will need this in the future.