ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 2000 VBA Question (https://www.excelbanter.com/excel-programming/285705-excel-2000-vba-question.html)

mab

Excel 2000 VBA Question
 
I have a very large worksheet that contains a lot of data and I jus
want to be able to pull name and email. Can someone tell me how t
write code that would do the following:

Start at cell A1 (Will copy and paste info to another workseet)
move down 3 rows and over 4 columns (copy cell paste to anothe
worksheet)
move down 4 rows and back to column 1 and continue to end of file.

I think I just need help with how to move to different rows and column
until the end of file. Thank you

--
Message posted from http://www.ExcelForum.com


Don Guillett[_4_]

Excel 2000 VBA Question
 
try this

Sub CopyEvery4()
Dim nm As Integer
With ActiveSheet
For nm = 1 To .UsedRange.Rows.Count Step 4
ctr = Sheets("sheet4").Cells(Rows.Count, "a").End(xlUp).Row + 1
x = .Rows(nm).Row
Cells(x, "a").Copy Sheets("sheet4").Cells(ctr, 1)
Cells(x, "a").Offset(3, 4).Copy _
Sheets("sheet4").Cells(ctr, 2)
Next nm
End With
End Sub

--
Don Guillett
SalesAid Software

"mab" wrote in message
...
I have a very large worksheet that contains a lot of data and I just
want to be able to pull name and email. Can someone tell me how to
write code that would do the following:

Start at cell A1 (Will copy and paste info to another workseet)
move down 3 rows and over 4 columns (copy cell paste to another
worksheet)
move down 4 rows and back to column 1 and continue to end of file.

I think I just need help with how to move to different rows and columns
until the end of file. Thank you.


---
Message posted from
http://www.ExcelForum.com/




Jim Rech

Excel 2000 VBA Question
 
Is it accurate to say that what you want is to copy cell E4 and every 7th
cell below it (E11, E18, etc) until you hit an empty cell?

--
Jim Rech
Excel MVP




All times are GMT +1. The time now is 11:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com