BANDI MAHA
Member
Members
Forum Posts: 23
Member Since:
July 20, 2020
July 20, 2020
Offline
Good morning and happy new year everyone ^ _ ^ Admin, I have a trouble to copy and paste cells and removing empty columns based on the existing column
please help me create the correct copy and paste code based on this sample file ... thanks for taking the time to respond to my request
Purfleet
England
Member
Members
Trusted Members
Trusted Members
Forum Posts: 415
Member Since:
December 20, 2019
December 20, 2019
Offline
There is no code in the attached workbook to review?
This is limited, but should start you off, the easist way to remove blank rows is to sort the data after pasting
Sub CopyPaste()
Worksheets("Sheet1").Range("c4:d24").Copy Worksheets("Paste").Range("c5")
Worksheets("Paste").Range("c4:d24").Sort key1:=Range("c4"), order1:=xlAscending, Header:=xlYes
End Sub
Also get rid of the merged cells in row 3, they will only cause you pain
Answers Post
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Barbara White, Riny van Eekelen
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1939
SunnyKow: 1432
Anders Sehlstedt: 918
Purfleet: 415
Frans Visser: 349
Hans Hallebeek: 332
David_Ng: 306
lea cohen: 248
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
Crystal Harris
Amaan Abdi
Sarah Yelland
Ahsan AYUB
Daniel Neilson
Joy Nicholes
Earl Hanlon
Paulo Pinto
Tavonga Machigere
Marc Poulopoulos
Forum Stats:
Groups: 3
Forums: 25
Topics: 7058
Posts: 30933
Member Stats:
Guest Posters: 49
Members: 34430
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —