+ Reply to Thread
Results 1 to 8 of 8

Copy Paste Formula adding extra rows

  1. #1
    Registered User
    Join Date
    06-20-2019
    Location
    South Africa
    MS-Off Ver
    2016
    Posts
    6

    Copy Paste Formula adding extra rows

    Hi there
    I have a sheet "invoice template" which contains 6 rows per 'invoice'. Each invoice pulls the reference and the container number from the second sheet ("jobs")
    This works in the first 6 rows reference is =jobs!A2,and container is =jobs!B2

    However when I copy those 6 rows in 'invoicetemplate" to create the next invoice underneath it (from row7) the formula pastes the reference number as =jobs!A8 instead of =jobs!A3, and container number pastes as =jobs!B8 instead of =jobs!B3

    basically the formula is adding the 6 rows each time it is pasted - which it should not do as the items in the job sheet are underneath each other with no open rows
    Attached Files Attached Files
    Last edited by ultramel; 10-21-2022 at 04:00 AM.

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

    Re: Copy Paste Formula adding extra rows

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. As you are new here, I shall do it for you this time: https://www.mrexcel.com/board/thread...-rows.1219918/)
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,476

    Re: Copy Paste Formula adding extra rows

    Instead of the simple:

    =jobs!A2

    in H1, you should use this instead:

    =INDEX(jobs!A:A,INT((ROWS($1:1)-1)/5)+2)

    and a similar change for K3:

    =INDEX(jobs!B:B,INT((ROWS($1:1)-1)/5)+2)

    Then when you copy the block of 5 rows for each invoice down, these will only increment by one row each time.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    06-20-2019
    Location
    South Africa
    MS-Off Ver
    2016
    Posts
    6

    Re: Copy Paste Formula adding extra rows

    AliGW - I have noted this and will make sure to comply going forward, thank you

    Pete_UK - that worked perfectly !!! thank you so much

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,924

    Re: Copy Paste Formula adding extra rows

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,476

    Re: Copy Paste Formula adding extra rows

    Quote Originally Posted by ultramel View Post
    ... Pete_UK - that worked perfectly !!! thank you so much ...
    You're welcome, and thanks for the rep.

    Pete

  7. #7
    Registered User
    Join Date
    06-20-2019
    Location
    South Africa
    MS-Off Ver
    2016
    Posts
    6

    Re: Copy Paste Formula adding extra rows

    I am trying to create a Macro which will copy the rows of my first "invoice" - and then continue to paste those rows beneath each other "x" number of times? The number
    of times could either be a message box with an input I enter, or it could count the number of rows in the sheet !jobs - to give the number of times it should paste if possible?

    Rows to copy (=A1:AB22)
    paste in: (=A23:AB44)
    and then paste again in (=A45:AB66)
    and then paste again in (=A67:AB88)

    I have found this but am struggling to get it working:

    Please Login or Register  to view this content.
    Last edited by ultramel; 11-16-2022 at 06:25 AM.

  8. #8
    Registered User
    Join Date
    11-14-2022
    Location
    Canada
    MS-Off Ver
    Office 95 (7.0)
    Posts
    8

    Re: Copy Paste Formula adding extra rows

    Good information, indeed.

+ 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. How to disable excel adding extra rows when scrolled down?
    By Excelforum*ser_mH7 in forum Excel General
    Replies: 7
    Last Post: 02-17-2020, 04:00 AM
  2. [SOLVED] Macro adding 4 extra rows for each value of a specific table
    By St3ff3ns in forum Excel General
    Replies: 6
    Last Post: 01-03-2018, 10:13 AM
  3. Adding extra rows within a spreadsheet
    By barneyrubble1965 in forum Excel General
    Replies: 1
    Last Post: 11-28-2017, 02:16 PM
  4. Converting rows to columns and adding extra rows as required
    By teco in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2016, 04:18 PM
  5. Replies: 8
    Last Post: 08-27-2012, 04:37 PM
  6. extra hours adding money for each extra hour worked FORMULA
    By cynthiamcastro in forum Excel General
    Replies: 3
    Last Post: 06-18-2012, 11:27 AM
  7. How do I copy/paste subtotals without all the extra data?
    By climberboy in forum Excel General
    Replies: 1
    Last Post: 08-08-2005, 06:21 PM

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