+ Reply to Thread
Results 1 to 9 of 9

Ordering Question

  1. #1
    Registered User
    Join Date
    01-06-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Ordering Question

    Is it possible to give sets of numbers an order?

    This is a bit difficult to explain so it's best to see the attachment (or code below) as an example.
    (The order is based on the Date - But as long as everything is sorted acording to date in the first place, 'Date' may not even be needed in the final formula).

    Please Login or Register  to view this content.
    Does a formula for this even exist?

    Thanks
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-06-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Ordering Question

    Sorry, the code didn't display properly, see the attachment instead.

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,443

    Re: Ordering Question

    Hi,

    If you just want the list of numbers as per your attachment,

    D8=IF(B8<>B7,1,D7+1)

    and copy down
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Contributor
    Join Date
    04-23-2009
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003 work, 2007 home
    Posts
    199

    Re: Ordering Question

    In 2007: select row 7 to end, sort by column B (smallest to largest), add level- sort by column A Oldest to newest

  5. #5
    Registered User
    Join Date
    01-06-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Ordering Question

    Legend!

    That works great.
    Thanks Sweep!

  6. #6
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,443

    Re: Ordering Question

    If your data isn't in ordered form, this

    =SUMPRODUCT(($B$8:$B$27=B8)*(A8>$A$8:$A$27))+1

    will do instead.

  7. #7
    Registered User
    Join Date
    01-06-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Ordering Question

    Wow, even better

  8. #8
    Registered User
    Join Date
    01-06-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Ordering Question

    Hi Sweep,
    Thanks again for the help, the SUMPRODUCT formula works perfect except with the date formats I have (see attached sheet).
    It considers November as a later month than December. Therefore, giving the wrong order.

    It may a simple problem to do with formats but I can't seem to figure it out. No matter what format I change it to, it doesn't change.

    Should hopefully be a quick solution, any ideas?
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-06-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Ordering Question

    I have found the answer.
    The file was exported from somewhere and made everything text format, to turn them back into number formats:
    Select the data range
    In Data tab > Text to Columns
    Click Finish

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1