hi guys,
the below script is the first macro I run, how should I update the script to run similar data like below? I need to delete the entire row with the text "sub total" in column A. the original file has Sub total in row 22 and row 83.
any tips or tricks how to do it?
Sub TGL_salesjournal()
'
' TGL_salesjournal Macro
'
'
Rows("22:22").Select
Selection.Delete Shift:=xlUp
ActiveWindow.SmallScroll Down:=51
Rows("83:83").Select
Selection.Delete Shift:=xlUp
ActiveWindow.SmallScroll Down:=-51
Range("B8:C17").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Selection.End(xlToRight).Select
Range("X8").Select
ActiveSheet.Paste
Range("V8:W8").Select
thank you
the below script is the first macro I run, how should I update the script to run similar data like below? I need to delete the entire row with the text "sub total" in column A. the original file has Sub total in row 22 and row 83.
any tips or tricks how to do it?
Asset Group | Transaction Description | Shares/Par | |
FUTURE | PURCHASE FUTURE | 1.000 | |
FUTURE | PURCHASE FUTURE | 6.000 | |
FUTURE | PURCHASE FUTURE | 45.000 | |
FUTURE | PURCHASE FUTURE | 7.000 | |
Sub Total | FUTURE | 79.000 | |
STOCK MARKET | SALE ON STOCK MARKET | 8,504.000 | |
STOCK MARKET | SALE ON STOCK MARKET | 9,978.000 | |
STOCK MARKET | SALE ON STOCK MARKET | 86.000 | |
STOCK MARKET | SALE ON STOCK MARKET | 529.000 | |
Sub Total | STOCK MARKET | 12,515,072.000 |
Sub TGL_salesjournal()
'
' TGL_salesjournal Macro
'
'
Rows("22:22").Select
Selection.Delete Shift:=xlUp
ActiveWindow.SmallScroll Down:=51
Rows("83:83").Select
Selection.Delete Shift:=xlUp
ActiveWindow.SmallScroll Down:=-51
Range("B8:C17").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Selection.End(xlToRight).Select
Range("X8").Select
ActiveSheet.Paste
Range("V8:W8").Select
thank you