Copy values from nth row from column on other sheet

BKGLTS

Board Regular
Joined
Aug 27, 2018
Messages
82
Hello,

I have found a few different solutions online for this that seem quite simple but just won't work for me. I need help please.
I have a column (F) of values, text, and blanks on Sheet1 that I need to copy the values of every 5th row into a new list on Sheet2 starting with F3.

I have this on Sheet1 column F:

F1=Header
F2valuesr
F3=8
F4=(blank)
F5=Description
F6=(blank)
F7=(blank)
F8=16
F9=(blank)
F10=Description
F11=(blank)
F12=(blank)
F13=5
etc...

On Sheet2 I want this:
D2=8
D3=16
D4=5
etc...

Thank you!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Try this:
Code:
Sub Copy_Range()
'Modified 7/24/2019 9:05:32 PM  EDT
Application.ScreenUpdating = False
Dim i As Long
Dim Lastrow As Long
Dim x As Long
x = 2
Lastrow = Sheets(1).Cells(Rows.Count, "F").End(xlUp).Row
For i = 3 To Lastrow Step 5
Sheets(1).Cells(i, "F").Copy Sheets(2).Cells(x, "D")
x = x + 1
Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Here is a macro that should do what you asked for...
Code:
[table="width: 500"]
[tr]
	[td]Sub GetNumbersOnly()
  Sheets("Sheet1").Columns("F").SpecialCells(xlConstants, xlNumbers).Copy Sheets("Sheet2").Range("D2")
End Sub[/td]
[/tr]
[/table]

HOW TO INSTALL MACROs
------------------------------------
If you are new to macros, they are easy to install and use. To install it, simply press ALT+F11 to go into the VB editor and, once there, click Insert/Module on its menu bar, then copy/paste the above code into the code window that just opened up. That's it.... you are done. To use the macro, go back to the worksheet with your data on it and press ALT+F8, select the macro name (GetNumbersOnly) from the list that appears and click the Run button. The macro will execute and perform the action(s) you asked for. If you will need to do this again in this same workbook, and if you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.
 
Last edited:
Upvote 0
I forgot to specify that I am needing a formula solution please. My apologies.
 
Last edited:
Upvote 0
I have no formula solution. I'm not very good with formulas so maybe someone else will be able to help you.
 
Upvote 0
How would this work. User wanted every fifth cell copied. How do you know every fifth cell would be a constant?
Here is a macro that should do what you asked for...
Code:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Sub GetNumbersOnly()
  Sheets("Sheet1").Columns("F").SpecialCells(xlConstants, xlNumbers).Copy Sheets("Sheet2").Range("D2")
End Sub[/TD]
[/TR]
</tbody>[/TABLE]

HOW TO INSTALL MACROs
------------------------------------
If you are new to macros, they are easy to install and use. To install it, simply press ALT+F11 to go into the VB editor and, once there, click Insert/Module on its menu bar, then copy/paste the above code into the code window that just opened up. That's it.... you are done. To use the macro, go back to the worksheet with your data on it and press ALT+F8, select the macro name (GetNumbersOnly) from the list that appears and click the Run button. The macro will execute and perform the action(s) you asked for. If you will need to do this again in this same workbook, and if you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.
 
Upvote 0
How would this work. User wanted every fifth cell copied. How do you know every fifth cell would be a constant?
Actually, I missed the every 5th row part of the OP's question, so my code should be ignored (although, as it turns out, the OP did not want a VBA solution any way).



I forgot to specify that I am needing a formula solution please. My apologies.
Here is an array-entered** formula that should work (adjust the red highlighted ranges to match your actual range of data)...

=IFERROR(INDEX(Sheet1!F:F,SMALL(IF(ISNUMBER(Sheet1!F$1:F$13),ROW(Sheet1!F$1:F$13)),ROWS($1:1))),"")

**Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself
 
Last edited:
Upvote 0
Actually, I missed the every 5th row part of the OP's question, so my code should be ignored (although, as it turns out, the OP did not want a VBA solution any way).




Here is an array-entered** formula that should work (adjust the red highlighted ranges to match your actual range of data)...

=IFERROR(INDEX(Sheet1!F:F,SMALL(IF(ISNUMBER(Sheet1!F$1:F$13),ROW(Sheet1!F$1:F$13)),ROWS($1:1))),"")

**Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself

What part of this formula specifies how many rows to skip before copying the next number? I need to be able to specify how many rows to skip please.
 
Upvote 0

Forum statistics

Threads
1,224,748
Messages
6,180,721
Members
452,995
Latest member
isldboy

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