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 Data in group

Working on a excel sheet maintaining huge data and need to sort it date wise,
amount wise (range 1 to 10000, 10001 to 20000).

The problem is that we have data set of different clients, this data set of
each client spread over 9 columb and 7 rows and i need to sort it in a group.

How do i do this?
Data set should'nt be destroy?



for example
Columbs a

Name of Client nature of business funded non funded trade
business date of approval limit expiry date fresh/renewal remarks.

rows a
DM
MMF
IERF
BD/RISK LINE
PAD
OTHERS
SUBTOTAL



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Sorting Data in group

The code below sorts groups of Rows.
The code uses this line to perform the sort
If Range("A" & SubRowCount) < Range("A" & RowCount) Then
which is cell A of the first row of the group. If you want to use Column b
of the second row of the group then it would be
If Range("B" & (SubRowCount+1)) < Range("A" & (RowCount+1)) Then



Sub SortGroup()

GroupRows = 7
StartRow = 1

RowCount = StartRow
Do While Range("A" & RowCount) < ""
SubRowCount = RowCount + GroupRows
Do While Range("A" & SubRowCount) < ""
If Range("A" & SubRowCount) < Range("A" & RowCount) Then

Rows(SubRowCount & ":" & (GroupRows - 1)).Cut
Rows(RowCount).Insert Shift:=xlDown
End If
SubRowCount = SubRowCount + GroupRows
Loop
RowCount = RowCount + GroupRows
Loop

End Sub

"Akber Khan, Karachi, Pakistan" wrote:

Working on a excel sheet maintaining huge data and need to sort it date wise,
amount wise (range 1 to 10000, 10001 to 20000).

The problem is that we have data set of different clients, this data set of
each client spread over 9 columb and 7 rows and i need to sort it in a group.

How do i do this?
Data set should'nt be destroy?



for example
Columbs a

Name of Client nature of business funded non funded trade
business date of approval limit expiry date fresh/renewal remarks.

rows a
DM
MMF
IERF
BD/RISK LINE
PAD
OTHERS
SUBTOTAL



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
group data in wksht columns for sorting purposes. Jennifer Excel Discussion (Misc queries) 2 February 8th 10 08:07 PM
Sorting data in group Akber Khan, Karachi, Pakistan New Users to Excel 1 January 11th 08 12:22 PM
Sorting data in group Akber Khan, Karachi, Pakistan Excel Discussion (Misc queries) 3 January 11th 08 10:43 AM
Sorting in group daniellchiu via OfficeKB.com Excel Discussion (Misc queries) 2 December 1st 07 11:16 AM
Group Sorting Myrna Larson Excel Programming 0 August 5th 04 11:34 PM


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