Forum Discussion
Rachel1994
Jun 13, 2022Copper Contributor
VBA Format data as table and filter
Hello! I'm writing a macro to make a data output look nicer for users. I have formatted the data as a table, and now I want to sort the data on two things: first Supplier Name, then Product Descr...
- Jun 14, 2022
Does this work for you?
tbl.Range.Sort key1:=Range("C1"), order1:=xlAscending, key2:=Range("D1"), order2:=xlAscending, Header:=xlYes
Subodh_Tiwari_sktneer
Jun 14, 2022Silver Contributor
Does this work for you?
tbl.Range.Sort key1:=Range("C1"), order1:=xlAscending, key2:=Range("D1"), order2:=xlAscending, Header:=xlYes
- Rachel1994Jun 14, 2022Copper ContributorYes this works perfectly, thanks so much for your help!
- Subodh_Tiwari_sktneerJun 14, 2022Silver Contributor
You're welcome Rachel1994! Glad it worked as desired.