Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sorting of data

I have a spreadsheet containing musicdata. I want to make a sort, depending on a validated column. Some times it's the artist (a=artist) and some times it's the titel ex

Various artist; Barrelhouse piano should be sorted after tite

Davis, Miles; Working with Miles Davis Quientet should be sorted after artist

Validation (A or T) is column
Artist is column
Titel is column D
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Sorting of data

To use - right click sheet tabview code copy/paste this

Here is a doubleclick event I use to sort by the active column if double
click row 4.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Row = 4 Then
Range("a5:g" & Range("a65536").End(xlUp).Row) _
..Sort Key1:=Cells(5, ActiveCell.Column), Order1:=xlAscending,
Orientation:=xlTopToBottom
Cells(5, Target.Column).Select
End If
'end sub

'below plays the song if double click below row 4
mc = Cells(ActiveCell.Row, "e")
If Target.Row 4 Then
x = Right(Application.OperatingSystem, 4)
If x < 5 Then
cmd = "Start " & Chr(34) & mc & Chr(34)
Shell cmd 'works with xl97
Else
Dim FullFileName As String
'FullFileName = Selection.Offset(0, mc)
FullFileName = mc
ActiveWorkbook.FollowHyperlink Address:=FullFileName
End If
End If
End Sub

--
Don Guillett
SalesAid Software

"Arne Harder Bang" wrote in message
...
I have a spreadsheet containing musicdata. I want to make a sort,

depending on a validated column. Some times it's the artist (a=artist) and
some times it's the titel ex:

Various artist; Barrelhouse piano should be sorted after titel

Davis, Miles; Working with Miles Davis Quientet should be sorted after

artist.

Validation (A or T) is column B
Artist is column C
Titel is column D



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
Data Sorting Penrhos Excel Discussion (Misc queries) 9 January 30th 09 05:33 AM
sorting data I. Miller Excel Worksheet Functions 3 April 3rd 07 07:40 AM
Sorting data to match existing data Jack C Excel Discussion (Misc queries) 4 May 24th 06 09:48 AM
colors of bar charted data don't follow data after sorting Frankgjr Charts and Charting in Excel 2 January 17th 06 12:33 PM
Sorting Data vik Excel Worksheet Functions 6 September 9th 05 04:18 PM


All times are GMT +1. The time now is 08:58 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"