
BANDI MAHA
Member
Members

Forum Posts: 23
Member Since:
July 20, 2020
July 20, 2020

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: 412
Member Since:
December 20, 2019
December 20, 2019

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: Ruth Savage, Andy Kirby, Roy Lutke, Jeff Krueger, Tom VAN LOO, Nada Perovic
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27236
Member Stats:
Guest Posters: 49
Members: 31889
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —
