+ Reply to Thread
Results 1 to 5 of 5

Auto insert 'x' rows depending on value 'y'

  1. #1
    Registered User
    Join Date
    08-12-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Auto insert 'x' rows depending on value 'y'

    Hi,
    I am new to VB and could do with some help to be able to automatically insert 'x' number of rows in my spreadsheet.

    The sheet looks as follows;
    I want the sheet to automatically insert the number of rows indicated in column D minus 1 (the existing row becomes row 1) Also the value calculated in Column E should be copied into the new rows.

    Column A
    Invoice Date - input by user

    Column B
    Invoice Number - Input by user

    Column C
    Invoice Total - Input by user

    Column D
    Number of Budget Centres invoice is split accross - Value 1-60 input by user

    Column E
    Value of invoice per budget centre - automatically calculate C divided by D

    Columns F - O
    Additional data - input by user

    many thanks

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Auto insert 'x' rows depending on value 'y'

    Hi, Try this:-
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Registered User
    Join Date
    08-12-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Auto insert 'x' rows depending on value 'y'

    Hi
    Thanks for this Mick,
    It works great though I'd like the new rows to be inserted below the original row.
    I have tried adjusting certain values in the code but can't figure it out !

    Thanks again for help

    regards
    Richard

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Auto insert 'x' rows depending on value 'y'

    Hi, Try this:-
    Please Login or Register  to view this content.
    Regards Mick

  5. #5
    Registered User
    Join Date
    08-12-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Auto insert 'x' rows depending on value 'y'

    Hi Mick

    Well that is brilliant.
    Thank you so much.

    regards
    Richard

+ 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