+ Reply to Thread
Results 1 to 2 of 2

Extract & count data from Access program

  1. #1
    Registered User
    Join Date
    02-04-2006
    Posts
    1

    Exclamation Extract & count data from Access program

    Hello All,

    I am new to advanced applications in Excel. Here is my problem.
    I have an access database that I need to extract data from.
    The extraction process works fine. i extract the updated data into excel,
    then I need to count down 45 rows and generate a Page Total heading and show that page total.
    The hard part is that the extracted data is always expanding. How do I extract - get the page totals - continue extracting 45 rows per page -total each page and show a final total at the end of the existing data?

    Can anyone please help?
    Thank You!

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Experiment with this and see if it can work for you:

    In the destination sheet
    A1: Page
    A2: =INT((ROW()-2)/45)+1

    When you extract the data, start the destination range in Cell B1.

    After the data has been extracted, copy cell A2 down through the last row with extracted data.

    That formula will show:
    1 in cells A2:A46
    2 in cells A47:A91
    etc...changing values every 45 rows.

    Then
    Select from A1 through the end of the data.
    Data>Subtotals>
    At each change in: Page
    Use Function: SUM
    Add subtotal to: (select the fields to be subtotalled)
    Check: Summary below data
    Click the [OK] button

    That will put subtotals every 45 rows of data and put a grand total at the end.

    Note: the Page calculations in Col_A will end up being a bit off AFTER adding the subtotals, but the row counts will be correct. Just don't include that column in the print range.

    Is that something you can use?

    Regards,
    Ron

+ 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