Forum Discussion
Formula
- Sep 21, 2019
Based on your description, assuming you have two sheets called "Tracking" and "Invoice" and if you want to copy the cell A13 on Invoice Sheet if changed to the first empty cell after the last row with data in column A on Tracking Sheet, place the following code on the Invoice Sheet Module.
To do so, right click on Invoice Sheet Tab --> View Code and paste the code given below into the opened code window and save your workbook as Macro-Enabled Workbook.
If name of your tracking sheet is not "Tracking", change the name of tracking sheet it in the code.
Private Sub Worksheet_Change(ByVal Target As Range) If Target.CountLarge > 1 Then Exit Sub Dim wsDest As Worksheet Set wsDest = Worksheets("Tracking") 'Assuming Tracking is the name of the Tracking Sheet, change it as required If Target.Address(0, 0) = "A13" Then If Target <> "" Then Target.Copy wsDest.Range("A" & Rows.Count).End(3)(2) End If End If End SubLet me know if this is what you were trying to achieve.
That's difficult to answer why it isn't working. Do you change D35 manually? The point to remember here is that the Change Event Code will only be triggered automatically when you change the content of the cells manually not if the content is changed through formulas.
Can I put code in the change form to Calac a total in the tracking sheet or not.
- Subodh_Tiwari_sktneerSep 25, 2019Silver Contributor
I am unable to understand what you are saying.
I would suggest you to open a new question with your new requirement along with the code you are using at present. Don't forget to upload a sample file to show what exactly you are trying to achieve otherwise it becomes difficult sometimes to visualize what the asker is trying to achieve specially when description is not very helpful.