Help Organizing Data

Demni009

New Member
Joined
Mar 5, 2014
Messages
22
Hi all,

I am looking for some help. I wrote a macro that collects data from other spreadsheets saved in a certain file location. This macro runs great. I now want to be able to organize the data based on the values. I have tried the following line of code as a test to see if I can get a small amount of data on the sheet to organize.

Code:
SOSheet.Range("A1:A8").Sort key1:=Range("A1"), Order1:=xlDescending, Header:=xlYes

It turns out the code doesn't work and crashes my macro. The strange thing is, it does work in other macros. I can't figure out why.

If you need to see the rest of my code I would be happy to show you.

Thanks in advance for the help.

Cheers!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
SOSheet is defined as such.


Code:
Dim SOSheet As Worksheet

' Create a new workbook
        
        Set Book = Workbooks.Add
            With Book
                .Title = "Comp."
            End With


        Set SOSheet = ActiveWorkbook.Sheets("Sheet3")
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,214
Members
449,074
Latest member
cancansova

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