Re: Group cells and sort

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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" <KNS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6FC59A26-050B-4772-A19F-BBFD4989DADF@xxxxxxxxxxxxxxxx
> 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" <KNS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:C0D7BEEC-7BEA-4F67-A2AC-C9C9ABC651DB@xxxxxxxxxxxxxxxx
> > > 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
> >
> >
> >


.



Relevant Pages

  • Re: Calculus XOR Probability
    ... Distance and length are real numbers. ... It's a sequential set of points, that is a line of some sort, with a real ... A sequence of elements from some set X is essentially a function f: ... If you simply want to forget about infinitesimal line segments, ...
    (sci.math)
  • Re: Calculus XOR Probability
    ... Distance and length are real numbers. ... It's a sequential set of points, that is a line of some sort, with a real ... A sequence of elements from some set X is essentially a function f: ...
    (sci.math)
  • Re: for x,y > 7 twins(x+y) <= twins(x) + twins(y)
    ... zeros -- ones and zeros wonderfully agreeing to come ... to people sort of understood to be ... a novel sequence, ... positively calling for an informed yarn, ...
    (sci.math)
  • Re: What about an EXPLICIT naming scheme for built-ins?
    ... But having sortedto return a iterator ... sortedreturns a brand new sorted sequence. ... -- sorting long sequences to use only a few of the first elements. ... if you need to sort a long list to get the top 10 elements. ...
    (comp.lang.python)
  • Re: Create a numbered list that allows change in priority.
    ... long as it's higher than the ones you wish to sort. ... Sort the query Ascending on the Sequence field. ... you change a record's Sequence value the entire display will re-sort. ...
    (microsoft.public.access.tablesdbdesign)