Afro_Cookie
Board Regular
- Joined
- Mar 17, 2020
- Messages
- 103
- Office Version
- 365
- Platform
- Windows
There's a portion of my code I use to cut and paste the used range from one sheet to another. Recently it's started adding extra lines into the used range which is affecting my table by adding blank lines. This is mildly inconvenient as I have to manually delete the lines, but it's not supposed to add them in the first place.
Any advice on how to correct or tweek my code/trouble shoot this?
This is just a portion of the code.
So right now that code should cut and paste 6 lines, but it is taking 10 instead and I have no idea why.
Any advice on how to correct or tweek my code/trouble shoot this?
This is just a portion of the code.
VBA Code:
' Remove Duplicates
ActiveSheet.Range("A:I").RemoveDuplicates Columns:=Array(4, 6, 7), Header:=xlNo
'paste used range after ducplicates are removed
ActiveSheet.UsedRange.Select
Selection.Cut
Sheets("abcd").Select
Range("A" & Cells.Rows.Count).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
So right now that code should cut and paste 6 lines, but it is taking 10 instead and I have no idea why.