VBA: Split data into multiple worksheets based on column

Lupa4

New Member
Joined
Apr 17, 2018
Messages
1
Where can I learn more about the syntax that Mirabeau used at the beginning of this thread? The word paste is never used, but the code pastes everything to a new sheet. I'd like to figure out how to PasteSpecial:=xlPasteColumnWidths with this code.
With Sheets.Add(after:=Sheets(sname))
Sheets(sname).Cells(1).Resize(rws, cls).Copy .Cells(1)
.Cells(1).Resize(rws, cls).Sort .Cells(cc), 2, Header:=xlYes
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Watch MrExcel Video

Forum statistics

Threads
1,089,976
Messages
5,411,620
Members
403,383
Latest member
Excelacity

This Week's Hot Topics

Top