Free for PREMIUM members
[Webinar] Streamline your web hosting managementRegister Today
Public Sub CopyTradeHistory()
Dim wks As Worksheet
Dim vSheets() As Variant
Dim vSheetname As Variant
Dim rngSrc As Range
vSheets = Array("pm", "rm")
On Error Resume Next
Application.DisplayAlerts = False
Application.ScreenUpdating = False
For Each vSheetname In vSheets
Set wks = ActiveWorkbook.Worksheets(vSheetname)
Set rngSrc = wks.Cells.Find("Account Trade History")
Set rngSrc = wks.Range(rngSrc, rngSrc.End(xlDown).End(xlDown).Offset(0, 11))
ActiveWorkbook.Worksheets(vSheetname & "_output").Delete
Set wks = ActiveWorkbook.Worksheets.Add
wks.Name = vSheetname & "_output"
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Open in new window
Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
Your question, your audience. Choose who sees your identity—and your question—with question security.