Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Sort Column, Excel 2000 & 2003

Hello,

On worksheet2 I have 3 columns that gets added to daily.
ColumnA is Description, ColumnB is Dates, & ColumnC is standard
abbrivations
Christmas 12/25/2006 H
Labor day 9/03/2006 H
Birthday 7/10/2006 B
Annivarsey 9/05/2006 A
Testing 11/02/2006 O

I want to sort on ColumnC keeping all my H together. So how can I sort
columnC so that all my H are kept together in this order H, WH, O, B, A
each letter will multiply dates and descriptions?

Thank you for your help in advance,
jfcby

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Sort Column, Excel 2000 & 2003

Hello,

I've been really struggling with Sort Column macro! During my search
for a sort code I've found one but I do not know how to get it to sort
Sheet2 ColumnC?

Sub SortArray()

Dim myArr1 As Variant
Dim iCtr As Long
Dim jCtr As Long
Dim Temp As Variant

myArr1 = Array("H", "WH", "O", "B", "A")

For iCtr = LBound(myArr1) To UBound(myArr1) - 1
For jCtr = iCtr + 1 To UBound(myArr1)
If myArr1(iCtr) myArr1(jCtr) Then
Temp = myArr1(iCtr)
myArr1(iCtr) = myArr1(jCtr)
myArr1(jCtr) = Temp
End If
Next jCtr
Next iCtr

For iCtr = LBound(myArr1) To UBound(myArr1)
MsgBox iCtr & "--" & myArr1(iCtr)
Next iCtr

End Sub

Thank you for your help,
jfcby



jfcby wrote:
Hello,

On worksheet2 I have 3 columns that gets added to daily.
ColumnA is Description, ColumnB is Dates, & ColumnC is standard
abbrivations
Christmas 12/25/2006 H
Labor day 9/03/2006 H
Birthday 7/10/2006 B
Annivarsey 9/05/2006 A
Testing 11/02/2006 O

I want to sort on ColumnC keeping all my H together. So how can I sort
columnC so that all my H are kept together in this order H, WH, O, B, A
each letter will multiply dates and descriptions?

Thank you for your help in advance,
jfcby


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
Function: days of week in column, Excel 2000 & 2003 jfcby[_2_] Excel Programming 1 December 6th 06 02:56 PM
Use Sort method for 2002/2003 in 2000. MarMo Excel Programming 7 November 29th 06 02:05 PM
Excel 2003 - How do I sort subjects in a worksheet by column? computerilliterate! Excel Worksheet Functions 0 November 10th 06 01:31 AM
Getting only partial text sort in Column (2003 excel) paigeturner Excel Discussion (Misc queries) 1 July 28th 06 07:19 PM
Sort in 2003 not working in 2000 karpaydiem Excel Programming 3 April 13th 06 07:07 AM


All times are GMT +1. The time now is 12:47 PM.

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

About Us

"It's about Microsoft Excel"