Row numbering macros to renumber rows

  • Re: Row numbering macros to renumber rows


    With the newly added number column, the headers are from A to R with rows all the way down to say 480, which shows me about 10 pages, plus I have the headers saved to show on each page.

  • Re: Row numbering macros to renumber rows


    I am a newbie in VBA. I have a list of scores which have to be graded in nine point scale (ie. A1,A2, B1,B2,C1,C2,D1,D2,E where score <33)


    I sort this range and have to grade the first i take the count of the number of failures with less than 33 score then, total_cnt_passed/8 records would give me the count for each of the grades. i have to grade the first n records with A1, but here if the score is 80 at the nth record the next records should also be graded as A1 for all those 80 scorers & so on for the rest of the grades.


    i guess, it may be clear.
    :?
    Plz help, thanx.


    Sample table:


    Marks Grades
    90 A1
    89 A1
    88 A1
    88 A1
    86 A1
    85 A1
    84 A1
    82 A1
    83 A1
    80 A1
    80 A1
    80 A1
    80 A1
    80 A1
    78 A2
    68 A2
    57 A2
    56 A2
    54 A2
    54 A2
    54 A2
    54 A2
    46 A2
    36 A2
    34 B1
    33 B1

  • Re: Row numbering macros to renumber rows


    Maxaraxa,


    Just select B1:R480 and then File|Print Area|Set Print Area should do it. This will only print this range. If the range changes alot, then we can create some code to do this for you.

  • Re: Row numbering macros to renumber rows


    Wow, that works very nicely, ty Seti. I finally understand what you are talking about, sorry, been a stressful week. I see that I can set my print area for whatever I want. Now, once I set it, will it always be there unless I change?


    Thanks again! :)

  • Re: Row numbering macros to renumber rows


    It is actually a named range now just like any other range. The only way it changes is if you change it. Also, you can have a print area for each sheet. If you have different sections that you print regularly, you can create a macro to set the print area to each section, one at a time, and print each section out.


    Glad I was able to help.

  • Re: Row numbering macros to renumber rows


    If all the cells in a column starting from row 6 have data entered you can use this formula at the bottom of the column


    =subtotal(3,range:range)


    If you use excel 2003 use


    =subtotal(103,range:range) allows hidden rows to be excluded from total


    Remember to insert rows to move formula down when you need new rows


    Say that column A is filled with data from a6 to a500 use formula


    =subtotal(3,a6:a500)


    This will keep spreadsheet same size


    Andy

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!