Copy and Paste

Shane50GT

New Member
Joined
Jul 27, 2021
Messages
6
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I am hoping to get some help on copy and paste! Seems like something simple and probably is but here goes....I need to repeat several data sets that have 6 rows of data down a single column, the data sets point to various other sheets but the constant is that I need each row within the data set to increase by 1 each time I paste the data set, however, it is increasing each row 6 due to the 6 individual lines of data...See example below..... (I will need to copy and paste the data sets around 60 times).

Direct Craft Description=Sheet2!$B9
Number of Craft=Sheet2!$D9
S.T. Pay Rate=Sheet2!$K9
O.T Pay Rate=Sheet2!$K88
S.T. Billable Rate=Sheet3!$R9
O.T. Billable Rate=Sheet3!$S9
COPIED AND PASTED FROM ABOVE
Direct Craft Description=Sheet2!$B17<<<How can I make this paste as =Sheet2!$B10
Number of Craft=Sheet2!$D17<<<How can I make this paste as =Sheet2!$D10
S.T. Pay Rate=Sheet2!$K17<<<How can I make this paste as =Sheet2!$K10
O.T Pay Rate=Sheet2!$K96<<<How can I make this paste as =Sheet2!$K89
S.T. Billable Rate=Sheet3!$R17<<<How can I make this paste as =Sheet3!$R10
O.T. Billable Rate=Sheet3!$S17<<<How can I make this paste as =Sheet3!$S10
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Welcome to the MrExcel forum!

Here's one way:

Book1
ABC
1
2Direct Craft Descriptionb9
3Number of Craftd9
4S.T. Pay Ratek9
5O.T Pay Ratek88
6S.T. Billable Rater9
7O.T. Billable Rates9
8Direct Craft Descriptionb10<<<How can I make this paste as =Sheet2!$B10
9Number of Craftd10<<<How can I make this paste as =Sheet2!$D10
10S.T. Pay Ratek10<<<How can I make this paste as =Sheet2!$K10
11O.T Pay Ratek89<<<How can I make this paste as =Sheet2!$K89
12S.T. Billable Rater10<<<How can I make this paste as =Sheet3!$R10
13O.T. Billable Rates10<<<How can I make this paste as =Sheet3!$S10
Sheet1
Cell Formulas
RangeFormula
B2,B8B2=INDEX(Sheet2!$B:$B,INT((ROWS($B$2:$B2)-1)/6)+9)
B3,B9B3=INDEX(Sheet2!$D:$D,INT((ROWS($B$2:$B2)-1)/6)+9)
B4,B10B4=INDEX(Sheet2!$K:$K,INT((ROWS($B$2:$B2)-1)/6)+9)
B5,B11B5=INDEX(Sheet2!$K:$K,INT((ROWS($B$2:$B2)-1)/6)+88)
B6,B12B6=INDEX(Sheet2!$R:$R,INT((ROWS($B$2:$B2)-1)/6)+9)
B7,B13B7=INDEX(Sheet2!$S:$S,INT((ROWS($B$2:$B2)-1)/6)+9)
 
Upvote 0
Wow, that works! I need to study that formula to understand what you did there but it works. Haven't used INDEX much and trying to figure out why you used INT, I will go study. I was thinking it would be something to account for the lines in between but I wouldn't have gotten that figured out for a while. Thank you fella.
 
Upvote 0
Actually, in this case you don't need to use INT. The ROWS(...)-1 will always be a multiple of 6. Anyway, let me know if you have any questions! :cool:
 
Upvote 0
Eric,
I found an issue with the formula and I'm not sure how to fix it. When I paste the data sets for the 3rd time and beyond I am having to manually calculate how much to subtract because the "-1" is not enough to get where I need it to be. So for example, I changed it to -1.1 on the 4th paste and that worked, on the 5th paste I had to change it to -3.3, on the 6th paste I had to change it to -6.6, on the 7th paste I had to change it to -9.9, and on the 8th I had to change it to -10....Do you know of a way to account for the increased number of rows as I continue to paste the data sets down the sheet? Thank you for your time in advance.
 
Upvote 0
If you paste the formulas every 6 lines, you shouldn't have to adjust the offset. Are you adding more rows? Do you have headers and/or empty lines between each group of 6?
 
Upvote 0
If you paste the formulas every 6 lines, you shouldn't have to adjust the offset. Are you adding more rows? Do you have headers and/or empty lines between each group of 6?
That's what it is, I have 2 blank lines between each data set. Leaving space because I might have to add some additional lines to the data set in the future. Is there something we can add to the formula to account for those 2 blank lines between each set?
 
Upvote 0
That's what it is, I have 2 blank lines between each data set. Leaving space because I might have to add some additional lines to the data set in the future. Is there something we can add to the formula to account for those 2 blank lines between each set?
Just make the divider 8 right?
 
Upvote 0
Yes, that should work. Since you have Excel 365, there might be another way too. I'll let you know if I figure that out.
 
Upvote 0
That was it, made did find and replace the /6 to /8 and changed all of the subtractions back to 1. Thank you again for the help.
 
Upvote 0

Forum statistics

Threads
1,215,111
Messages
6,123,151
Members
449,098
Latest member
Doanvanhieu

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