Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default How do I sort two columns without changing the formatting?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default How do I sort two columns without changing the formatting?

Copy the columns somewhere else, sort them, select the old columns and do
editpaste special and select values

--
Regards,

Peo Sjoblom


"LisaD" wrote in message
...



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default How do I sort two columns without changing the formatting?

I guess I can do that. It just seems like a lot of extra work. Are there any
other ideas. Doesn't the program have some sort of fuction to allow formats
to stay the same?

"Peo Sjoblom" wrote:

Copy the columns somewhere else, sort them, select the old columns and do
editpaste special and select values

--
Regards,

Peo Sjoblom


"LisaD" wrote in message
...




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default How do I sort two columns without changing the formatting?

You were a bit frugal with your original question, here is one way

http://www.cpearson.com/excel/banding.htm


--
Regards,

Peo Sjoblom




"LisaD" wrote in message
...
I guess I can do that. It just seems like a lot of extra work. Are there
any
other ideas. Doesn't the program have some sort of fuction to allow
formats
to stay the same?

"Peo Sjoblom" wrote:

Copy the columns somewhere else, sort them, select the old columns and do
editpaste special and select values

--
Regards,

Peo Sjoblom


"LisaD" wrote in message
...






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 303
Default How do I sort two columns without changing the formatting?

3 options..

enter the names on a clean unshaded sheet
do the sort
copy the names and
go to a sheet with the shaded lines
and edit... paste special... values

or
have a list of pupils on a shaded lines sheet in alphabetical order
just mark cells next to the names

or
use a macro to do the sort and re- shade the lines after the sort

Sub ShadeEveryOtherRow()
Dim Counter As Integer

Sheets("sheet4").Select
Range("A1:M40").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Range("A1").Select

For Counter = 1 To 40
'If the row is an odd number (within the selection)...
If Counter Mod 2 = 1 Then
'Set the pattern to xlGray16.
Rows(Counter).Interior.Pattern = xlGray16

Else
Rows(Counter).Interior.Pattern = nil
End If
Next

End Sub

You will have to adjust the ranges to suit.
--
Greetings from New Zealand

"LisaD" wrote in message
...





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,117
Default How do I sort two columns without changing the formatting?

if it's banded shading, you can input that with conditional formatting
& then when you sort it, the banding will stay put..........

conditional formatting:
formula =
=mod(row(),2)=0
set format

susan


On Apr 4, 6:06 pm, "Bill Kuunders" wrote:
3 options..

enter the names on a clean unshaded sheet
do the sort
copy the names and
go to a sheet with the shaded lines
and edit... paste special... values

or
have a list of pupils on a shaded lines sheet in alphabetical order
just mark cells next to the names

or
use a macro to do the sort and re- shade the lines after the sort

Sub ShadeEveryOtherRow()
Dim Counter As Integer

Sheets("sheet4").Select
Range("A1:M40").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Range("A1").Select

For Counter = 1 To 40
'If the row is an odd number (within the selection)...
If Counter Mod 2 = 1 Then
'Set the pattern to xlGray16.
Rows(Counter).Interior.Pattern = xlGray16

Else
Rows(Counter).Interior.Pattern = nil
End If
Next

End Sub

You will have to adjust the ranges to suit.
--
Greetings from New Zealand

"LisaD" wrote in message

...



- Hide quoted text -

- Show quoted text -



Reply
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
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
Changing the range of a table sort RedHook New Users to Excel 2 May 31st 06 08:38 AM
Sort command does not sort some columns? BillyBob New Users to Excel 4 May 11th 06 04:16 PM
data sort is not including all columns in sort Tracy Excel Discussion (Misc queries) 1 October 4th 05 12:16 AM
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 07:07 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"