Darren_workforce
Board Regular
- Joined
- Oct 13, 2022
- Messages
- 146
- Office Version
- 365
- Platform
- Windows
I have a sheet (Staffing) with a graph that borrows its information from another worksheet (Erlang). The Erlang worksheet has a lot of information I don't want to present during my meeting so that is why I moved the graph. I would like to double click on any cells within the range below on the Staffing worksheet and have the number populate on the Erlang sheet which would then update the graph. The problem is the cell I want to double click contains a formula. Is there a workaround to the code that would allow what I'm requesting to happen?
VBA Code:
Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("c16:l16")) Is Nothing Then
If Target.Cells.Count = 1 then
Cancel = True
Sheets("Erlang").Range("c5") = Target.Value
End If
End If
End Sub