+ Reply to Thread
Results 1 to 9 of 9

Ordering data easily

  1. #1
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196

    Ordering data easily

    I am trying to automate the prodution of my schools exam timetable. The problem i have at the moment is that the exams are either a or p for am or pm. If someone is sitting more than one exam in the same a or p plot i have to assign them an order eg p1 p2 p3 and is determined by the number of people taking the exam. I therefore have columns with the candidate number, name, date. exam, a or p, number doing exam. Does anyone have a way of putting the a1 a2 p1 s2 etc into the next column so it is specific to the candidate and date and in order of number doing exam? Many thanks jack

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Say your Name in Col A and AM or PM in Col C try something like

    =SUMPRODUCT(--($A$2:A2=A2)*($C$2:C2=C2))
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    This does not appear to take into account the number doing the exam or the date. I have attached a sample timetable with a few entries and added a column to show what I would like it to produce.

    Many thanks

    Jack
    Attached Files Attached Files

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I get

    A1
    A2
    P1
    P2
    A1
    P1
    using
    =E2&SUMPRODUCT(--($A$2:A2=A2)*($E$2:E2=E2)*($F$2:F2=F2))
    HTH

    VBA Noob

  5. #5
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    That is good except that it itdoesnt take into consideration the number doing the exam so for candiate B as more people are doing the second exam it should say P2 then P1 no P1 then P2

    Many thanks for all your help

    Jack

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Sort your data then

    VBA Noob

  7. #7
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    I know I can sort it but this is only one stage in a very large project as afterwards I have to add the timings and rooms and extra times and therefore I want to try and cut down the number of manual steps I have to do to get it to work. Also if someone then wants to use the sheet and wants the data in a particular order and resorts it then all the A1,2,3 will be messed up. Is there no way of doing this automatically. I thought it could possibly be done using a macro. The method I have tried is to use vlookup and rank and put the data into a separate sheet ordering them in by no of people taking exam and then putting the A1,2,3,P1,2,3 as you have done and then using a lookup to put them back in. I have had a number of problems with this mainly that there will be thousands of entries and so the sheet has to do 4/5fold that many calculations to work out the order an put the value back into the original sheet. I therefore hoped there could be an easier way to do it using just the one sheet. Sorry to be a nuisance. Many thanks

    Jack

  8. #8
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    I take it from the lack of response that this can not be done easily?!

  9. #9
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    Does anyone have any ideas about you to order it automatically?

    Also when I have achieved this I need to look at timings to say when the exams will start and end. How can I get it to recognise if a P2 is for the same person on the same day and so automatically add the time on after their P1 exam?

    Any Ideas welcomed

    Many thanks

    Jack

+ 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