Hi All
I have a Spreadsheet that has the ability to have data entered manually with a trigger point and all my calcualtions work great.
Instead of manually entering my data now. I set up a macro to import large amounts of data.
The probelm I'm having now I can Not get the automatic calculations to work?
I'm using the following code to copy and past from Sheet1 to JeffsTransp
This Code Works
'B=B C=C D=D E=E F=L G=E H=F I=G K=H L=I M=J N=O T=M.
Application.EnableEvents = False
r = rngCell.Row
'u = Sheets("JeffsTransp").Range("B" & Rows.Count).End(xlUp).Row + 1
Sheets("JeffsTransp").Rows(u & ":" & u).Insert Shift:=xlDown
Sheets("JeffsTransp").Range("B" & u) = Sheets("Sheet1").Range("B" & r)
Sheets("JeffsTransp").Range("C" & u) = Sheets("Sheet1").Range("C" & r)
Sheets("JeffsTransp").Range("D" & u) = Sheets("Sheet1").Range("D" & r)
Sheets("JeffsTransp").Range("F" & u) = Sheets("Sheet1").Range("L" & r)
Sheets("JeffsTransp").Range("G" & u) = Sheets("Sheet1").Range("E" & r)
Sheets("JeffsTransp").Range("H" & u) = Sheets("Sheet1").Range("F" & r)
Sheets("JeffsTransp").Range("I" & u) = Sheets("Sheet1").Range("G" & r)
Sheets("JeffsTransp").Range("K" & u) = Sheets("Sheet1").Range("H" & r)
Sheets("JeffsTransp").Range("L" & u) = Sheets("Sheet1").Range("I" & r)
Sheets("JeffsTransp").Range("M" & u) = Sheets("Sheet1").Range("J" & r)
Sheets("JeffsTransp").Range("N" & u) = Sheets("Sheet1").Range("O" & r)
Sheets("JeffsTransp").Range("T" & u) = Sheets("Sheet1").Range("M" & r)
Application.EnableEvents = True
u = u + 1
I Can Not Get This Calculation to Work.? it works when the data is manually entered to trigger the trigger point.
Application.EnableEvents = True
Application.Calculation = xlAutomatic
Cells(Target.Row, 1).Formula = "=A4+A15+1"
Cells(Target.Row, 14).Formula = "=K16*L16"
Cells(Target.Row, 16).Formula = "=K16+N16"
Cells(Target.Row, 18).Formula = "=SUM(K16+O16)*Q16"
Cells(Target.Row, 20).Formula = "=R16*S16"
Cells(Target.Row, 21).Formula = "=SUM(P16-R16-T16)+M16"
Application.ScreenUpdating = True
Exit Sub
What is the best way to automate the Calculations with the Copy and Paste Code?
any Help that can be offered would be greatly appreciated
This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.
Thread Closed.
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks