Sorting data changes all columns

mrsamjones28

New Member
Joined
Jun 12, 2019
Messages
5
I did a transfer using VBA. I am having trouble now filtering the data and sorting it. I used the following in VBA:
Code:
Sub Copy()
Sheets("Data Entry").Range("A5:A654").Copy Sheets("Try1").Range("A5")
Sheets("Data Entry").Range("A5:A654").Copy Sheets("Try1").Range("D5")
Sheets("Data Entry").Range("A5:A654").Copy Sheets("Try1").Range("G5")
Sheets("Data Entry").Range("A5:A654").Copy Sheets("Try1").Range("J5")
Sheets("Data Entry").Range("A5:A654").Copy Sheets("Try1").Range("M5")
Worksheets("Try1").Range("B5:b654").Value = Worksheets("Data Entry").Range("F5:F654").Value
Worksheets("Try1").Range("E5:E654").Value = Worksheets("Data Entry").Range("G5:G654").Value
Worksheets("Try1").Range("H5:H654").Value = Worksheets("Data Entry").Range("H5:H654").Value
Worksheets("Try1").Range("K5:K654").Value = Worksheets("Data Entry").Range("I5:I654").Value
Worksheets("Try1").Range("N5:N654").Value = Worksheets("Data Entry").Range("J5:J654").Value

End Sub

When I try to go to the Try1 data and sort it, doing sorting on one column affects all the columns. I am not sure why.
 
Last edited by a moderator:

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
When sorting are you just selecting col B & when it asks if you want to expand the selection, do you select "continue with current selection"?
Also do you have any merged cells?
 
Upvote 0

Forum statistics

Threads
1,215,526
Messages
6,125,328
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top