View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Libby Libby is offline
external usenet poster
 
Posts: 151
Default Copying Select Repeating Cells in a Column

If you have a row of data say in column A and you want to paste every 4th
data point into B, starting with row 1, your code would look something like:

Sub everyFourth()

Dim i As Integer
Dim j As Integer

j = 1

For i = 1 To 30
Cells(i, 2).Value = Cells(j, 1).Value
j = j + 4
Next i

End Sub

This code goes through 30 rows in A. This number can be adjusted to suit
your needs.

"Shalebot" wrote:

How would I go about creating a macro to select and copy certain cells in a
column and get them to paste in a blank column back-to-back (ie: selecting
every fourth cell in a column and pasting it one after another in a new
column)?

I tried finding something like this in these and other discussion groups,
but I'm not sure what to even call it, so my ability to find what I'm trying
to describe on my own is virtually nonexistent.

Any help would be greatly appreciated.