+ Reply to Thread
Results 1 to 6 of 6

Total row in report

  1. #1
    Moo
    Guest

    Total row in report

    I have a spreadsheet that I would like to total at the bottom. But I don't
    want to have to keep inserting rows when it fills up. Is there a way to have
    the total at the very bottom of the spreadsheet, but still have it print out
    on a report with all the data?



  2. #2
    Guest

    Re: Total row in report

    Hi
    The usual way around this is to have a Totals line at the top of the list,
    under the titles, and then use Window/Freeze Panes so you can see it all of
    the time.

    --
    Andy.


    "Moo" <[email protected]> wrote in message news:LzT4e.5261$jR3.8@edtnps84...
    >I have a spreadsheet that I would like to total at the bottom. But I don't
    >want to have to keep inserting rows when it fills up. Is there a way to
    >have the total at the very bottom of the spreadsheet, but still have it
    >print out on a report with all the data?
    >




  3. #3
    Glenn Mulno
    Guest

    Re: Total row in report

    Another way is to use a second sheet to do your calculations. This would
    probably require you to write a little VBA code to find the last row of
    data.

    It's too bad Excel does not have knowledge of keywords like END or LAST.
    This would make life much easier if you could do something like:
    =SUM(A1:LAST)

    Glenn

    "Moo" <[email protected]> wrote in message news:LzT4e.5261$jR3.8@edtnps84...
    >I have a spreadsheet that I would like to total at the bottom. But I don't
    >want to have to keep inserting rows when it fills up. Is there a way to
    >have the total at the very bottom of the spreadsheet, but still have it
    >print out on a report with all the data?
    >




  4. #4
    Macgru
    Guest

    Re: Total row in report


    U¿ytkownik "Glenn Mulno" <[email protected]> napisa³ w wiadomo¶ci
    news:ek#[email protected]...
    > Another way is to use a second sheet to do your calculations. This would
    > probably require you to write a little VBA code to find the last row of
    > data.
    >
    > It's too bad Excel does not have knowledge of keywords like END or LAST.
    > This would make life much easier if you could do something like:
    > =SUM(A1:LAST)
    >
    > Glenn
    >
    > "Moo" <[email protected]> wrote in message news:LzT4e.5261$jR3.8@edtnps84...
    > >I have a spreadsheet that I would like to total at the bottom. But I

    don't
    > >want to have to keep inserting rows when it fills up. Is there a way to
    > >have the total at the very bottom of the spreadsheet, but still have it
    > >print out on a report with all the data?
    > >

    >
    >


    you can try to modify this code to your requirements:

    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    ttlrows = Range("a1").CurrentRegion.Rows.Count
    Range("a1").End(xlDown).Offset(1, 0) =
    WorksheetFunction.Sum(Range("a1:a" & ttlrows))
    End Sub

    paste it into workseet module
    i assumed that data you want to sum up are located in col A
    each time you print it will add sum of col A in last row ( assuming that no
    row is blank i col A)

    mcg



  5. #5
    Moo
    Guest

    Re: Total row in report


    "Macgru" <[email protected]> wrote in message
    news:[email protected]...
    >
    > U¿ytkownik "Glenn Mulno" <[email protected]> napisa³ w wiadomo¶ci
    > news:ek#[email protected]...
    >> Another way is to use a second sheet to do your calculations. This would
    >> probably require you to write a little VBA code to find the last row of
    >> data.
    >>
    >> It's too bad Excel does not have knowledge of keywords like END or LAST.
    >> This would make life much easier if you could do something like:
    >> =SUM(A1:LAST)
    >>
    >> Glenn
    >>
    >> "Moo" <[email protected]> wrote in message news:LzT4e.5261$jR3.8@edtnps84...
    >> >I have a spreadsheet that I would like to total at the bottom. But I

    > don't
    >> >want to have to keep inserting rows when it fills up. Is there a way to
    >> >have the total at the very bottom of the spreadsheet, but still have it
    >> >print out on a report with all the data?
    >> >

    >>
    >>

    >
    > you can try to modify this code to your requirements:
    >
    > Private Sub Workbook_BeforePrint(Cancel As Boolean)
    > ttlrows = Range("a1").CurrentRegion.Rows.Count
    > Range("a1").End(xlDown).Offset(1, 0) =
    > WorksheetFunction.Sum(Range("a1:a" & ttlrows))
    > End Sub
    >
    > paste it into workseet module
    > i assumed that data you want to sum up are located in col A
    > each time you print it will add sum of col A in last row ( assuming that
    > no
    > row is blank i col A)
    >
    > mcg
    >


    Where do I paste it in the worksheet module?



  6. #6
    Macgru
    Guest

    Re: Total row in report


    U¿ytkownik "Moo" <[email protected]> napisa³ w wiadomo¶ci
    news:7Im5e.5876$yV3.964@clgrps12...
    >
    > "Macgru" <[email protected]> wrote in message
    > news:[email protected]...
    > >
    > > U¿ytkownik "Glenn Mulno" <[email protected]> napisa³ w

    wiadomo¶ci
    > > news:ek#[email protected]...
    > >> Another way is to use a second sheet to do your calculations. This

    would
    > >> probably require you to write a little VBA code to find the last row of
    > >> data.
    > >>
    > >> It's too bad Excel does not have knowledge of keywords like END or

    LAST.
    > >> This would make life much easier if you could do something like:
    > >> =SUM(A1:LAST)
    > >>
    > >> Glenn
    > >>
    > >> "Moo" <[email protected]> wrote in message

    news:LzT4e.5261$jR3.8@edtnps84...
    > >> >I have a spreadsheet that I would like to total at the bottom. But I

    > > don't
    > >> >want to have to keep inserting rows when it fills up. Is there a way

    to
    > >> >have the total at the very bottom of the spreadsheet, but still have

    it
    > >> >print out on a report with all the data?
    > >> >
    > >>
    > >>

    > >
    > > you can try to modify this code to your requirements:
    > >
    > > Private Sub Workbook_BeforePrint(Cancel As Boolean)
    > > ttlrows = Range("a1").CurrentRegion.Rows.Count
    > > Range("a1").End(xlDown).Offset(1, 0) =
    > > WorksheetFunction.Sum(Range("a1:a" & ttlrows))
    > > End Sub
    > >
    > > paste it into workseet module
    > > i assumed that data you want to sum up are located in col A
    > > each time you print it will add sum of col A in last row ( assuming that
    > > no
    > > row is blank i col A)
    > >
    > > mcg
    > >

    >
    > Where do I paste it in the worksheet module?
    >
    >


    into thisworkbook
    mcg



+ 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