laingy24

New Member
Joined
Apr 19, 2015
Messages
2
I want the below macro to leave the user on cell A3 in the sheet "Crew Satisfaction Data" but for some reason it leaves the user on a different sheet ("Response Calculator") that isn't mentioned at all in the Macro.

Can anyone tell me why and how I can fix it?

Sub SORTING_DATA()
'
' SORTING_DATA Macro
'

'
Columns("C:C").Select
Selection.Copy
Application.CutCopyMode = False
Sheets("Tidied CS Data").Select
Columns("B:E").Select
Selection.ClearContents
Sheets("Raw CS Data").Select
Selection.Copy
Sheets("Tidied CS Data").Select
Range("B1").Select
ActiveSheet.Paste
Sheets("Raw CS Data").Select
Columns("F:G").Select
Application.CutCopyMode = False
Selection.Copy
Columns("F:H").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Tidied CS Data").Select
Range("C1").Select
ActiveSheet.Paste
Sheets("Crew Satisfaction Data").Select
Range("A3").Select
End Sub

Ewan :O)
 
Last edited:

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,245
Office Version
  1. 365
Platform
  1. Windows
Your macro has lots of unqualified ranges. By that i mean they have no corresponding sheet to go with the range. That means excel will use the active sheet at the time the line executes. Which sheet is the active sheet when you start running the macro? I cant see any possible way that macro leaves you on any other cell than cell A3 of Crew Satisfaction Data sheet unless it doesnt complete. See if this does the same thing noting that each range has a corresponding sheet bar the last where we already know Crew Satisfaction Data is the active sheet:

Code:
Sheets("Raw CS Data").Columns("C:C").Copy Sheets("Tidied CS Data").Range("B1")
Sheets("Raw CS Data").Columns("F:H").Copy Sheets("Tidied CS Data").Range("C1")
Sheets("Crew Satisfaction Data").Select
Range("A3").Select
 

Watch MrExcel Video

Forum statistics

Threads
1,122,464
Messages
5,596,288
Members
414,052
Latest member
Dual Showman

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
Top