
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: 414
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: Nicholas Meyer, Vincent Malone II, Lakisha Hall
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
jaryszek: 183
Newest Members:
Herbie Key
Trevor Pindling
Stevan Kanjo
Erin Sheldon
Nikita Bhatia
Sheilah Taylor
Clare Webber
David Jenssen
Dominic Brosnahan
Young You
Forum Stats:
Groups: 3
Forums: 24
Topics: 6526
Posts: 28576
Member Stats:
Guest Posters: 49
Members: 32809
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —
