LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default When I sort it is carrying my formatting of cells

When I sort it carries my formatting of my cells with me, the same
program didn't used to when I was only sorting half the amount of data. I
want the values to be sorted while maintaining the formatting as it starts
out.

Public Sub SortCompetitors_Click()
If intSortMethod = 1 Then
strKey1Range = "X4"
strKey2Range = "W4"
strOrder1 = xlAscending
End If
If intSortMethod = 2 Then
strKey1Range = "W4"
strKey2Range = "V4"
strOrder1 = xlDescending
End If
If Range("Sheet3Protection") = "False" Then
ReadInfoFromForm
WriteInfoToSpreadsheet
Range("D4:BK51").Select
Selection.Sort Key1:=Range(strKey1Range), Key2:=Range(strKey2Range),
Order1:=strOrder1, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
Range("D4").Select
ReadFromSpreadsheet
WriteInfoToForm
Else
UnprotectCompetitorsSheet
ReadInfoFromForm
WriteInfoToSpreadsheet
Range("D4:BK51").Select
Selection.Sort Key1:=Range(strKey1Range), Key2:=Range(strKey2Range),
Order1:=strOrder1, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
Range("D4").Select
ReadFromSpreadsheet
WriteInfoToForm
ProtectCompetitorsSheet
End If
End Sub

Thanks,
Dave Marden


 
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
typing in a new cell and carrying the formatting of the previous c fadwa Excel Worksheet Functions 2 January 20th 10 12:21 PM
when i sort, how can i get the formatting to sort along with text PJ Excel Worksheet Functions 2 September 12th 06 01:03 PM
Carrying formatting automatically to new W/S Jonah Excel Worksheet Functions 4 September 6th 05 12:12 AM
Carrying over font formatting Ronnie R. Excel Discussion (Misc queries) 1 May 25th 05 07:51 PM
Excel Sort function should not sort the cell formatting! Lisa D.N.1 Excel Worksheet Functions 1 December 28th 04 08:37 PM


All times are GMT +1. The time now is 03:30 AM.

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"