+ Reply to Thread
Results 1 to 11 of 11

Sorting excel records by "page"

  1. #1
    Registered User
    Join Date
    10-03-2017
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    6

    Question Sorting excel records by "page"

    Our accounting office has this certification being issued for a student and it fits into a short bond paper. All those records are in a single sheet only. Now, we need to save them as PDF but they must be sorted alphabetically using the last name of the student. I am out of ideas on how to do this!

    Anyone who can help? TIA

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Sorting excel records by "page"

    .
    All those records are in a single sheet only.
    Does that mean each student's record is located on an individual worksheet by itself ? So if you have 50 student records, there are 50 worksheets in workbook ?

    Or does that mean if you have 50 student records, all 50 records are located on a single worksheet ?

    OR ... are you speaking of PAGE VIEW .... The VIEW menu tab, PAGE LAYOUT ?


    It would be very helpful for you to post a copy of the workbook here for review, minus any confidential information ... or at least a mockup of what the workbook looks like.
    Last edited by Logit; 10-03-2017 at 10:31 PM.

  3. #3
    Registered User
    Join Date
    10-03-2017
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    6

    Re: Sorting excel records by "page"

    //Or does that mean if you have 50 student records, all 50 records are located on a single worksheet ?

    Yes sir, this is how they've done it. It is designed in such a way that for each record of a student it will fit in a short bond paper.

  4. #4
    Registered User
    Join Date
    10-03-2017
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    6

    Re: Sorting excel records by "page"

    Here's a sample sir. We need to be able to sort them alphabetically using the last name.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-03-2017
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    6

    Re: Sorting excel records by "page"


  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Sorting excel records by "page"

    dee-u, I see this is your first thread here. Thank you for adding the cross-post link, which is required by our rules. As a new member, please take the time to review our rules. There aren't many, and they are all important.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sorting excel records by "page"

    Not sure if this approximates what you want.

    There are two dynamic named ranges:


    Row_Headers
    ='1st sem'!$A$1:INDEX('1st sem'!Q:Q,MATCH("zzzzzz",'1st sem'!Q:Q,1))
    Student_Name
    ='1st sem'!$B$1:INDEX('1st sem'!R:R,MATCH("zzzzz",'1st sem'!Q:Q,1))


    Upload contains one lookup range with names listed alphabetically. It is created by an array formula entered in L1 and filled down until you get blanks. (This list can be put anywhere. I put it there for convenience.) If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    There are two helper columns. In K8 and filled down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In L8 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In N1:W7 just copy the header range across with this formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    You'll need to format to match the source. I also formatted numbers so blanks do not show up as 0s. The same holds true for the next formula in N8:W160.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Sorting excel records by 'page'.xlsx

    Does this help?
    Dave

  8. #8
    Registered User
    Join Date
    10-03-2017
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    6

    Re: Sorting excel records by "page"

    Haven't done such complex Excel stuffs before, I am letting your solution sink in, thank you so much!

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sorting excel records by "page"

    You are welcome. Thank you for the feedback.

    Are the results what you were expecting?

  10. #10
    Registered User
    Join Date
    10-03-2017
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    6

    Re: Sorting excel records by "page"

    I'm slowly digesting how it works, one thing I noticed is it is kinda slow when used with a hundred records. It may become more problematic with more records.

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sorting excel records by "page"

    Quote Originally Posted by dee-u View Post
    I'm slowly digesting how it works, one thing I noticed is it is kinda slow when used with a hundred records. It may become more problematic with more records.
    I've tried to address possible bottle-necks in the formulas.

    1. I failed to mention that array formulas are resource hungry. Too many of them can slow a workbook down. Even though 100 names aren't that many array formulas try replacing the formula in L1 with this (still array entered).
      Formula: copy to clipboard
      Please Login or Register  to view this content.
    2. Replace the formula in L8 filled down with
      Formula: copy to clipboard
      Please Login or Register  to view this content.
    3. Then replace the formula in N8:W160 with
      Formula: copy to clipboard
      Please Login or Register  to view this content.
    1 and 2 above may not result in noticeable improvement. However #3 shows @ 17% improvement in speed at my end. I have found that replacing ROWS($8:8) with the ROW()-ROW($8:$8)+1 construction speeds formulas when they exceed @ 45,000 to 50,000 cells. The more cells the more noticeable the difference. I've never understood why. The sample I uploaded is applied to only 1530 cells (3 records). 100 records would apply to 51,000 cells.

    You can try applying the above. If the wb still under performs I suspect that a VBA (macro) solution would be far faster and more efficient. Unfortunately I do not know enough VBA to help with that.

    Please keep us posted.

    PS By the way. Is the resulting layout of my upload acceptable?
    Last edited by FlameRetired; 10-05-2017 at 05:12 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel 2010 -- "Visual Basic" "Macros" and "Record Macro" all disabled.
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2017, 06:11 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. "Freeze Panes" is dividing page into 4 "blocks"
    By bcamp1973 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-03-2015, 01:38 AM
  4. [SOLVED] Activate "sorting" feature when worksheets are setup to "password protect" itself
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2012, 09:04 PM
  5. Replies: 6
    Last Post: 01-26-2012, 10:02 PM
  6. Change print range "Page 1 to 3" to "Page 1 and 3"
    By london7871 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-19-2011, 01:24 AM
  7. Replies: 0
    Last Post: 02-09-2006, 05:15 PM

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