Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
KNS KNS is offline
external usenet poster
 
Posts: 2
Default Group cells and sort

Is it possible to group rows and have the sheet sorted by the first item in
the group? ie, we have orders with multiple items, and every item is on a
separate row, so if we wanted to sort the orders by the first item on the
order, is it possible to have that done and maintain the orders together?.
ie
I would want this:
order sku name
1 789 Bob
1 456 Bob
2 456 Sue
3 789 Joe
3 123 Joe
4 456 Jodi

Sorted like this:
order sku name
2 456 Sue
4 456 Jodi
1 789 Bob
1 456 Bob
3 789 Joe
3 123 Joe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Group cells and sort

Your example does not seem to show any sort order? In general unless the
data to be sorted has one or more 'keys' to provide the sequencing then you
will not be able to do it. If the data is pre-sorted in as much the order
it is supplied in, then you might find adding a helper column with a
sequence number from 1 to n useful, you can then use that as part of a sort
routine within the other column(s) you wish to sort on.

--
Cheers
Nigel



"KNS" wrote in message
...
Is it possible to group rows and have the sheet sorted by the first item

in
the group? ie, we have orders with multiple items, and every item is on a
separate row, so if we wanted to sort the orders by the first item on the
order, is it possible to have that done and maintain the orders together?.
ie
I would want this:
order sku name
1 789 Bob
1 456 Bob
2 456 Sue
3 789 Joe
3 123 Joe
4 456 Jodi

Sorted like this:
order sku name
2 456 Sue
4 456 Jodi
1 789 Bob
1 456 Bob
3 789 Joe
3 123 Joe



  #3   Report Post  
Posted to microsoft.public.excel.programming
KNS KNS is offline
external usenet poster
 
Posts: 2
Default Group cells and sort

I think I sort of understand what you're saying, but I'm not sure. My goal is
to sort the orders by the first item in the order, so in this instance if
there were two invoices that came through as:
Invoice sku name
A 3 Joe
A 1 Joe
B 1 Sue

Sorted, Invoice B would be at the top followed by Invoice A in the same
order that invoice A was previously so the data would look like:
Invoice sku name
B 1 Sue
A 3 Joe
A 1 Joe

Because the SKU in Invoice B would come before the first Sku in Invoice A.
Does that make sense?

"Nigel" wrote:

Your example does not seem to show any sort order? In general unless the
data to be sorted has one or more 'keys' to provide the sequencing then you
will not be able to do it. If the data is pre-sorted in as much the order
it is supplied in, then you might find adding a helper column with a
sequence number from 1 to n useful, you can then use that as part of a sort
routine within the other column(s) you wish to sort on.

--
Cheers
Nigel



"KNS" wrote in message
...
Is it possible to group rows and have the sheet sorted by the first item

in
the group? ie, we have orders with multiple items, and every item is on a
separate row, so if we wanted to sort the orders by the first item on the
order, is it possible to have that done and maintain the orders together?.
ie
I would want this:
order sku name
1 789 Bob
1 456 Bob
2 456 Sue
3 789 Joe
3 123 Joe
4 456 Jodi

Sorted like this:
order sku name
2 456 Sue
4 456 Jodi
1 789 Bob
1 456 Bob
3 789 Joe
3 123 Joe




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Group cells and sort

Hi
I understand your goal (?)- each SKU on an order should remain in the
sequence they where placed in, and that the FIRST item (presumbly defined
only by its position not its actual number) should be used to sort the
orders. So my next question is what determines the sort of the each order
relative to every other order? Your first example does not show any
specific sequence.
Is it the latest order to oldest? Numerical sequence? or something else?

I think my original solution using a helper column might still be valid eg
applied to your lastest example, add a helper coluimn from1 to n (3 in this
case) for each row.

Invoice sku name helper
A 3 Joe 1
A 1 Joe 2
B 1 Sue 3


Sort on Invoice (Descending) and Helper(Ascending)

Invoice sku name helper
B 1 Sue 3
A 3 Joe 1
A 1 Joe 2


latest invoice appears at top followed by the next etc., the sequence of
SKUs on the order will not change. This however does not work for your
first example!!! So I am finding your request difficult to interpret.
Also are you looking for a VBA solution?

--
Cheers
Nigel



"KNS" wrote in message
...
I think I sort of understand what you're saying, but I'm not sure. My goal

is
to sort the orders by the first item in the order, so in this instance if
there were two invoices that came through as:
Invoice sku name
A 3 Joe
A 1 Joe
B 1 Sue

Sorted, Invoice B would be at the top followed by Invoice A in the same
order that invoice A was previously so the data would look like:
Invoice sku name
B 1 Sue
A 3 Joe
A 1 Joe

Because the SKU in Invoice B would come before the first Sku in Invoice A.
Does that make sense?

"Nigel" wrote:

Your example does not seem to show any sort order? In general unless

the
data to be sorted has one or more 'keys' to provide the sequencing then

you
will not be able to do it. If the data is pre-sorted in as much the

order
it is supplied in, then you might find adding a helper column with a
sequence number from 1 to n useful, you can then use that as part of a

sort
routine within the other column(s) you wish to sort on.

--
Cheers
Nigel



"KNS" wrote in message
...
Is it possible to group rows and have the sheet sorted by the first

item
in
the group? ie, we have orders with multiple items, and every item is

on a
separate row, so if we wanted to sort the orders by the first item on

the
order, is it possible to have that done and maintain the orders

together?.
ie
I would want this:
order sku name
1 789 Bob
1 456 Bob
2 456 Sue
3 789 Joe
3 123 Joe
4 456 Jodi

Sorted like this:
order sku name
2 456 Sue
4 456 Jodi
1 789 Bob
1 456 Bob
3 789 Joe
3 123 Joe






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 cells during sort John Boyee Excel Discussion (Misc queries) 1 August 25th 08 04:48 PM
How do I sort a group of calculated cells in Excel? Benny cannot figure otu the solution Excel Worksheet Functions 2 July 5th 05 08:55 PM
Trying to group cells so that I can sort the upper most cell with. magnetoworld New Users to Excel 8 March 14th 05 07:17 PM
How do i sort a group of cells from highest to lowest JulieR Excel Discussion (Misc queries) 2 March 8th 05 08:31 PM
How can I group a bunch of cells together, so I can sort by colum. Pleasehelpme Excel Worksheet Functions 1 November 6th 04 04:06 AM


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