LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 3
Angry Sort Marco won't work in 2010

My office has just converted us to excel 2010. My lovley spreadsheet macro that made me the envy of the office no longer works and everyone now wants my blood.

The sheet is protected.

I have a macro that will select a variable amount of rows and sort alphabetically. It looks for the hidden cell xdummy then selects every row above it up to row 13, then sorts A -Z. Except now it doesn't. Help!

Sub Sort()
'
' Sort Macro
'

'Sheets("Cashflow").Unprotect "Cashflow2012"

Cells.Find(What:="xdummy", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate


Rows("13:" & ActiveCell.Row - 1).Select
Selection.Sort Key1:=Range("a13"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Sheets("Cashflow").Protect "Cashflow2012"

End Sub

Last edited by GSENSEI : August 31st 12 at 04:06 PM
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2010 to auto-generate an email to recipients in outlook 2010 dmcmillo Excel Programming 0 June 14th 12 10:12 PM
Form 4 Range of time from 1/20/2010 4:00 AM To 1/21/2010 10:00 AM Peter Gonzalez[_2_] Excel Worksheet Functions 2 January 26th 10 06:58 PM
How do I make an exact copy of my bill work sheets to year 2010 b1hughes Excel Discussion (Misc queries) 1 October 30th 09 09:38 PM
customer sort order in a marco Dennis Cheung[_2_] Excel Programming 4 May 12th 05 12:47 PM


All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"