MAMIBUSSOL
Board Regular
- Joined
- Jun 2, 2011
- Messages
- 95
for info:
I have a selection of transactions which I applied a filter. using the filter below I am selecting all transaction which have the code "REPAIR", I am then selecting just these records and transferring them to a new sheet called TRIAL. I need to run the process 3 times using firstly sheet CRED1, then CRED2 and finally CRED3, the data needs to be started in TRIAL in cell A3, transfer the data, on the next run it needs to put the data in the first blank row. which is why I am attempting to use the rows.count
i hope someone can help me as this has me stumped
I have a selection of transactions which I applied a filter. using the filter below I am selecting all transaction which have the code "REPAIR", I am then selecting just these records and transferring them to a new sheet called TRIAL. I need to run the process 3 times using firstly sheet CRED1, then CRED2 and finally CRED3, the data needs to be started in TRIAL in cell A3, transfer the data, on the next run it needs to put the data in the first blank row. which is why I am attempting to use the rows.count
Code:
Range("A" & .Rows.Count).End(xlUp).Offset (1)
i hope someone can help me as this has me stumped
Code:
Sub main()
Sheets.Add(AFTER:=Sheets(11)).Name = "TRIAL"
ActiveWorkbook.Worksheets("CRED1").Select
Call COPYPHASE
ActiveWorkbook.Worksheets("CRED2").Select
Call COPYPHASE
ActiveWorkbook.Worksheets("CRED3").Select
Call COPYPHASE
End Sub
Sub COPYPHASE()
ActiveSheet.Range("$B$1:$IE$388").AutoFilter FIELD:=3, Criteria1:="=REPAIRS"
ActiveSheet.Range("$A$3:$IE$388").Copy
Sheets("TRIAL").Select
Range("A" & .Rows.Count).End(xlUp).Offset (1)
ActiveSheet.Paste
End Sub