Copy Paste Formula adding extra rows

ultramel

New Member
Joined
Oct 21, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
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.



invoice.xlsx
ABCDEFGHIJKL
1Header YABC01113/09/2022JSI22070630N0
2Detail01526011530ADDAdditional Fees4
3Detail0100 030' NYKU 12345677
4Detail0100 030' JSI220706307
5Detail0100 030' Client Name7
6Header YABC01113/09/2022JSI22090172-01N0
7Detail01526011530SURDSurveillance DBN to JHB 4
8Detail0100 030' KKBU 80298847
9Detail0100 030' JSI220706307
10Detail0100 030' Client Name7
InvoiceTemplate
Cell Formulas
RangeFormula
H1H1=jobs!A2
K3K3=jobs!B2
H6H6=jobs!A8
K8K8=jobs!B8

---

invoice.xlsx
AB
1ReferenceContainer
2JSI22070630NYKU 1234567
3JSI22080600-01TCKU 8541112
4JSI22080604-01MKSP 1503300
5JSI22080602-01FSCU 8459992
6JSI22090250-01TLLU 4857838
7JSI22090138-01NYMU 9738838
8JSI22090172-01KKBU 8029884
jobs
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A3:A8Cell ValueduplicatestextNO
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Welcome to the Board!

Try putting this formula in cell H1 and then copying to H6, H11, etc.
Excel Formula:
=OFFSET(Jobs!$A$2,INT(ROW()/5),0)

And put this formula in cell K3 and copy to K8, K13, etc.
Excel Formula:
=OFFSET(Jobs!$B$2,INT(ROW()/5),0)
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Copy Paste Formula adding extra rows
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,223,702
Messages
6,173,959
Members
452,539
Latest member
delvey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top