excel
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Excel

Excel

resolvedResolved · Low Priority · Version 2007

replyReply Fri 23 Dec 2011, 09:46Delegate Ian said...

Ian has attended:
Excel Intermediate course
Excel Advanced course

Excel

I need to run a pivot table from a spreadsheet that has a differing number of lines of data in it each day.
The table works fine if there are less lines of data on a particular day, but fails to pick up any additional data if the spreadsheet has extra lines. How do I set the range for the Pivot Table so it automatically picks up all the data in my spreadsheet?

Thanks.

Ian Robertson

For upcoming training course dates see: Pricing & availability

replyReply Wed 4 Jan 2012, 12:58Trainer Doug said...

RE: Excel

Hi Ian

There is a way of running a pivot table where there are a variable number of rows of data added.

To do it you have to use a range name with a dynamic formula to define the source range for pivot table. Then as new items are added to the table, the named range will automatically expand.

Start by clicking in any cell in the range of data then
1. Select Formulas, Define Name.
2. Type a range name eg Database.
3. In the Refers to box type the following:

=OFFSET(Data!$A$1,0,0,COUNTA(Data!$A:$A),N)

where Data is the name of the worksheet containing the database.

4. Replace N with the number of columns in the Database range.

Then when creating the Pivot table

1. Select Insert, Pivot Table.
2. In the Select a table or range box type Database.
3. Cick OK to place the pivot table into a new worksheet.

Now whenever new records are added all that's needed is to select Povot Table Options, Refresh.

If there is likely to be a variable number of columns then replace N by:
CountA(Data!$1:$1)

This method avoids the need for macros or VBA code.

Regards
Doug Dunn
Best STL

replyReply Thu 16 Feb 2012, 12:16Delegate Ian said...

RE: Excel

Hi Doug,

Many thanks for that!

Regards,

Ian.

Wed 11 Jan 2012: Automatically marked as resolved.

 

Please browse our web site to find out more about
excel training in uk and other Microsoft training courses.

Excel tip:

Removing border lines on the keyboard

Highlight your cell(s) that have boreders on them and press CTRL + SHIFT + _, this will then remove the border lines.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard