I want the line in red color instead of moving to the A5 box, moving to the last line with writing
After the migration it clears the page from which it was migrated from Store Issue from the first data from cell A5
sub gg ()
Set Sh = Sheets("Store Issue")
Sh.Select
Dim Arr(1 To 1)
'======================================================
End_Row = Sh.Cells(Rows.Count, "a").End(xlUp).Row
Set Rng = Sh.Range("a4:g" & End_Row)
'======================================================
Arr(1) = "Store Issue (2)"
Application.ScreenUpdating = False
'======================================================
'Call Clear_Class
For Class = 1 To 1
If ActiveSheet.FilterMode = True Then
ActiveSheet.ShowAllData
ActiveSheet.AutoFilterMode = False
End If
'======================================================
Rng.AutoFilter Field:=7, Criteria1:=Arr(Class)
Set Rng_1 = ActiveSheet.AutoFilter.Range.Offset(2).Resize(ActiveSheet.AutoFilter.Range.Rows.Count - 1)
Rng_1.Copy Sheets(Arr(Class)).Range("A5")
Application.CutCopyMode = False
'======================================================
If ActiveSheet.FilterMode = True Then
ActiveSheet.ShowAllData
ActiveSheet.AutoFilterMode = False
End If
'======================================================
Next
'======================================================
'Call Hide_Columns_In_Range
'======================================================
Application.ScreenUpdating = True
'
End Sub
After the migration it clears the page from which it was migrated from Store Issue from the first data from cell A5
sub gg ()
Set Sh = Sheets("Store Issue")
Sh.Select
Dim Arr(1 To 1)
'======================================================
End_Row = Sh.Cells(Rows.Count, "a").End(xlUp).Row
Set Rng = Sh.Range("a4:g" & End_Row)
'======================================================
Arr(1) = "Store Issue (2)"
Application.ScreenUpdating = False
'======================================================
'Call Clear_Class
For Class = 1 To 1
If ActiveSheet.FilterMode = True Then
ActiveSheet.ShowAllData
ActiveSheet.AutoFilterMode = False
End If
'======================================================
Rng.AutoFilter Field:=7, Criteria1:=Arr(Class)
Set Rng_1 = ActiveSheet.AutoFilter.Range.Offset(2).Resize(ActiveSheet.AutoFilter.Range.Rows.Count - 1)
Rng_1.Copy Sheets(Arr(Class)).Range("A5")
Application.CutCopyMode = False
'======================================================
If ActiveSheet.FilterMode = True Then
ActiveSheet.ShowAllData
ActiveSheet.AutoFilterMode = False
End If
'======================================================
Next
'======================================================
'Call Hide_Columns_In_Range
'======================================================
Application.ScreenUpdating = True
'
End Sub