+ Reply to Thread
Results 1 to 4 of 4

Inserting multiple rows within different sections help

  1. #1
    Registered User
    Join Date
    04-29-2019
    Location
    Hampshire, England
    MS-Off Ver
    2018
    Posts
    43

    Inserting multiple rows within different sections help

    I am looking at trying to use a button to add an additional row into a table. I have managed to get this working but only for the top (Fruit) section, as when a new row is added in it pushes the rows down meaning the code for the veg section is then out of place for where to start adding the row.

    Is there a way to be able to add multiple rows within different sections as in the example with using buttons instead of right click insert every time?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Inserting multiple rows within different sections help

    This is poor data collation. You have fallen into the trap of muddling reporting with data collection: they should be two different things.

    I suggest you rethink your data model.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Inserting multiple rows within different sections help

    Ali has summarised the point but here's my stock answer to these sorts of questions.

    You are making the same mistake that I see time and time again. You are mixing up the two elements of data capture and final reporting. The two require quite different treatments.

    A lot of people start by designing the form that they expect to see as the final report or which at first glance seems the best way of capturing data, and then wonder why it's so difficult to subsequently analyse and summarise or extract information from it. Yours exhibits all those features.


    You should always capture data in a simple two dimensional table and worry about reporting information from it afterwards. Without exception doing this you will always be able to easily obtain management information. Rarely is this the case if you start the other way round.
    You will also throw open the whole wonderful world of the powerful Pivot table functionality.

    So before you get too far with this I'd create a single sheet database that contains the following columns

    Food Type - * values will be Fruit, Veg, ...
    Food Description - * values will be Apple, Pears, Beans, Leeks ....etc
    Shop Code - * values will be A, B..etc
    Quantity


    The * values could be Validation drop down cells from which you could pick values. The way I normally arrange these things is to have a single data entry row above the database in which the new values are entered, then a button which runs a macro that adds the new record to the database.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    04-29-2019
    Location
    Hampshire, England
    MS-Off Ver
    2018
    Posts
    43

    Re: Inserting multiple rows within different sections help

    Many thanks Richard for explaining that to me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to sort variable rows of data by a column in multiple sections
    By mannuhs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-11-2013, 03:22 PM
  2. Inserting Multiple Rows
    By hakulik in forum Excel General
    Replies: 5
    Last Post: 09-12-2012, 05:06 AM
  3. Replies: 7
    Last Post: 09-08-2012, 06:51 PM
  4. Improve response time for inserting rows in several hundred sections
    By LAF in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-05-2009, 03:58 PM
  5. Insert multiple rows in specific sections of sheet?
    By Marylander in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2007, 01:12 PM
  6. Inserting Multiple Rows
    By chuck1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2006, 10:30 AM
  7. Inserting Multiple Rows
    By Mike in forum Excel General
    Replies: 4
    Last Post: 02-08-2006, 09:25 PM
  8. Inserting multiple rows in excel with data in consecutive rows
    By technotronic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2005, 11:05 AM

Tags for this Thread

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