Hi All,
I want to filter the range on Column D and want to copy those filtered data from column D to column A in same row i.e next visible cell value of columns D should be copied to column A.
I tried to record a macro for same , but there i get the fixed value of range. Below is the code of recorded macro:
ActiveSheet.Range("$D$1:$D$11680").AutoFilter Field:=1, Criteria1:=Array( _
"EP1", "P01", "PC1", "PC2", "PC3", "PC6", "PC8", "PCH", "PCM", "PCW", "WT1"), Operator _
:=xlFilterValues
Range("D2").Select
Selection.copy
Range("A2").Select
ActiveSheet.Paste
Range("D841").Select
Application.CutCopyMode = False
Selection.copy
Range("A841").Select
ActiveSheet.Paste
Range("D1961").Select
Application.CutCopyMode = False
Selection.copy
Range("A1961").Select
ActiveSheet.Paste
Range("D3005").Select
Application.CutCopyMode = False
Selection.copy
Range("A3005").Select
ActiveSheet.Paste
Range("D4037").Select
Application.CutCopyMode = False
Selection.copy
Range("A4037").Select
ActiveSheet.Paste
Range("D5022").Select
Application.CutCopyMode = False
Selection.copy
Range("A5022").Select
ActiveSheet.Paste
Range("D5952").Select
Application.CutCopyMode = False
Selection.copy
Range("A5952").Select
ActiveSheet.Paste
Range("D7066").Select
Application.CutCopyMode = False
Selection.copy
Range("A7066").Select
ActiveSheet.Paste
Range("D8052").Select
Application.CutCopyMode = False
Selection.copy
Range("A8052").Select
ActiveSheet.Paste
Range("D9020").Select
Application.CutCopyMode = False
Selection.copy
Range("A9020").Select
ActiveSheet.Paste
Range("D10686").Select
Application.CutCopyMode = False
Selection.copy
Range("A10686").Select
ActiveSheet.Paste
Regards,
Abhishek
I want to filter the range on Column D and want to copy those filtered data from column D to column A in same row i.e next visible cell value of columns D should be copied to column A.
I tried to record a macro for same , but there i get the fixed value of range. Below is the code of recorded macro:
ActiveSheet.Range("$D$1:$D$11680").AutoFilter Field:=1, Criteria1:=Array( _
"EP1", "P01", "PC1", "PC2", "PC3", "PC6", "PC8", "PCH", "PCM", "PCW", "WT1"), Operator _
:=xlFilterValues
Range("D2").Select
Selection.copy
Range("A2").Select
ActiveSheet.Paste
Range("D841").Select
Application.CutCopyMode = False
Selection.copy
Range("A841").Select
ActiveSheet.Paste
Range("D1961").Select
Application.CutCopyMode = False
Selection.copy
Range("A1961").Select
ActiveSheet.Paste
Range("D3005").Select
Application.CutCopyMode = False
Selection.copy
Range("A3005").Select
ActiveSheet.Paste
Range("D4037").Select
Application.CutCopyMode = False
Selection.copy
Range("A4037").Select
ActiveSheet.Paste
Range("D5022").Select
Application.CutCopyMode = False
Selection.copy
Range("A5022").Select
ActiveSheet.Paste
Range("D5952").Select
Application.CutCopyMode = False
Selection.copy
Range("A5952").Select
ActiveSheet.Paste
Range("D7066").Select
Application.CutCopyMode = False
Selection.copy
Range("A7066").Select
ActiveSheet.Paste
Range("D8052").Select
Application.CutCopyMode = False
Selection.copy
Range("A8052").Select
ActiveSheet.Paste
Range("D9020").Select
Application.CutCopyMode = False
Selection.copy
Range("A9020").Select
ActiveSheet.Paste
Range("D10686").Select
Application.CutCopyMode = False
Selection.copy
Range("A10686").Select
ActiveSheet.Paste
Regards,
Abhishek