Share via

How can I Use a Form to add data to my database without needing to highlight the affected cells each time I want to add data and at the same time have Excel update the Pivot Table Data to included newly added lines to my database?

Don Jones 20 Reputation points
2026-01-06T21:00:56.4333333+00:00

i have a data file with 32 columns in which I have successfully used the Form "button" to create a data input form. I need to add 5-10 lines of new data each week. After closing the form, I have found that I have to highlight the header and all of the data to add new lines each time I open the form. At the same time, I have a Pivot table which uses the data in my data tab to summarize the data. But - each time I add new data the Pivot Table Data range does not automatically include the newly added data lines. How can I avoid these extra steps?

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

Answer accepted by question author

  1. Kimberly Olaño 23,545 Reputation points
    2026-01-06T23:21:30.32+00:00

    Thanks for sharing the details! Use an Excel Table

    An Excel Table automatically:

    • Expands when new rows are added (including via Form)
    • Keeps the Form connected without re-selecting cells
    • Automatically updates Pivot Table data ranges

    Step 1 - Convert Your Data Range into a Table

    Go to your data sheet

    Click any cell inside your existing data range

    Press Ctrl + T

    Make sure “My table has headers” is checked

    Click OK

    Your range is now a structured table

    Step 2 - Give the Table a Name (Highly Recommended)

    Click anywhere in the table

    Go to Table Design (or Table Tools → Design)

    Change the Table Name (top-left), for example:

    tblDatabase

    Step 3 - Use the Form Without Highlighting Anything

    Now:

    Click any cell inside the table

    Use Data → Form (or your Form button)

    • New rows will always append
    • No more selecting headers or ranges
    • Works every time

    Step 4 - Connect the Pivot Table to the Table (Once Only)

    If creating a new Pivot Table:

    Insert → PivotTable

    For Table/Range, select:

    tblDatabase

    Create Pivot

    If Pivot Table already exists:

    • Click inside the Pivot Table
    • PivotTable Analyze → Change Data Source
    • Set source to:
      tblDatabase

    Step 5 - Refresh Pivot Table (Optional Automation)

    • Right-click Pivot → Refresh
    • Or enable:
      PivotTable Options → Refresh data when opening the file

    The data range will now automatically include new rows added via the Form.

    See if this helps. If you need further assistance just let me know.

    Best regards,

    Kimberly

    Was this answer helpful?

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.