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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Watch MrExcel Video

Forum statistics

Threads
1,089,862
Messages
5,410,854
Members
403,331
Latest member
dignityy

This Week's Hot Topics

Top