Hello,
I have put together the following code for my table however I need to figure out how to include a SUM row at the bottom. Any assistance will be appreciated.
Workbooks.OpenText Filename:= _
"K:\1900\dwprod1900\data\export\general\before_n_after_remap_audit_umroi.txt", _
Origin:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 2), _
Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1)), _
TrailingMinusNumbers:=True
Windows("UMROI_Standard Cost Audit Reports.xlsm").Activate
Dim LastRow As Long
LastRow = Workbooks("before_n_after_remap_audit_umroi.txt").Worksheets("before_n_after_remap_audit_umro").Range("A:E").Find("*", , xlValues, xlPart, xlByRows, xlPrevious, False).Row
LastRow = Workbooks("before_n_after_remap_audit_umroi.txt").Worksheets("before_n_after_remap_audit_umro").Range("F:G").Find("*", , xlValues, xlPart, xlByRows, xlPrevious, False).Row
LastRow = Workbooks("UMROI_Standard Cost Audit Reports.xlsm").Worksheets("Before n After Remap Review").Range("A:E").Find("*", , xlValues, xlPart, xlByRows, xlPrevious, False).Row
LastRow = Workbooks("UMROI_Standard Cost Audit Reports.xlsm").Worksheets("Before n After Remap Review").Range("I:J").Find("*", , xlValues, xlPart, xlByRows, xlPrevious, False).Row
Worksheets("Before n After Remap Review").Range("A7:E" & LastRow).Select
Selection.ClearContents
Worksheets("Before n After Remap Review").Range("I7:J" & LastRow).Select
Selection.ClearContents
Workbooks("before_n_after_remap_audit_umroi.txt").Worksheets("before_n_after_remap_audit_umro").Range("A1:E" & LastRow).Copy
Workbooks("UMROI_Standard Cost Audit Reports.xlsm").Worksheets("Before n After Remap Review").Range("A7:E" & LastRow).PasteSpecial
Application.CutCopyMode = False
Workbooks("before_n_after_remap_audit_umroi.txt").Worksheets("before_n_after_remap_audit_umro").Range("F1:G" & LastRow).Copy
Workbooks("UMROI_Standard Cost Audit Reports.xlsm").Worksheets("Before n After Remap Review").Range("I7:J" & LastRow).PasteSpecial
Application.CutCopyMode = False
I have put together the following code for my table however I need to figure out how to include a SUM row at the bottom. Any assistance will be appreciated.
Workbooks.OpenText Filename:= _
"K:\1900\dwprod1900\data\export\general\before_n_after_remap_audit_umroi.txt", _
Origin:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 2), _
Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1)), _
TrailingMinusNumbers:=True
Windows("UMROI_Standard Cost Audit Reports.xlsm").Activate
Dim LastRow As Long
LastRow = Workbooks("before_n_after_remap_audit_umroi.txt").Worksheets("before_n_after_remap_audit_umro").Range("A:E").Find("*", , xlValues, xlPart, xlByRows, xlPrevious, False).Row
LastRow = Workbooks("before_n_after_remap_audit_umroi.txt").Worksheets("before_n_after_remap_audit_umro").Range("F:G").Find("*", , xlValues, xlPart, xlByRows, xlPrevious, False).Row
LastRow = Workbooks("UMROI_Standard Cost Audit Reports.xlsm").Worksheets("Before n After Remap Review").Range("A:E").Find("*", , xlValues, xlPart, xlByRows, xlPrevious, False).Row
LastRow = Workbooks("UMROI_Standard Cost Audit Reports.xlsm").Worksheets("Before n After Remap Review").Range("I:J").Find("*", , xlValues, xlPart, xlByRows, xlPrevious, False).Row
Worksheets("Before n After Remap Review").Range("A7:E" & LastRow).Select
Selection.ClearContents
Worksheets("Before n After Remap Review").Range("I7:J" & LastRow).Select
Selection.ClearContents
Workbooks("before_n_after_remap_audit_umroi.txt").Worksheets("before_n_after_remap_audit_umro").Range("A1:E" & LastRow).Copy
Workbooks("UMROI_Standard Cost Audit Reports.xlsm").Worksheets("Before n After Remap Review").Range("A7:E" & LastRow).PasteSpecial
Application.CutCopyMode = False
Workbooks("before_n_after_remap_audit_umroi.txt").Worksheets("before_n_after_remap_audit_umro").Range("F1:G" & LastRow).Copy
Workbooks("UMROI_Standard Cost Audit Reports.xlsm").Worksheets("Before n After Remap Review").Range("I7:J" & LastRow).PasteSpecial
Application.CutCopyMode = False
Last edited: