PDA

View Full Version : [SOLVED] Advanced Filter



austenr
09-30-2005, 12:56 PM
Norie was kind enought to supply this code to me. However it needs modifications. Presently it uses the MOD function to copy every other row to sheet2 starting at row 1. What I need to do and cannot figure out after playing with it is how to modify if to copy every row on sheet 1 to only even rows on sheet 2. Seems simple enought but can not figure it out. Can anyone help? Code is in attached WB. :help

Norie
09-30-2005, 01:31 PM
You won't be able to use Advanced Filter for this I'm afraid.

Tommy
09-30-2005, 01:53 PM
HI austenr,

Try this one :), as Norie says no filter though.



Sub CpyAlToAlt()
Dim mI As Long
mI = 1
While Sheets("Sheet1").Cells(mI, 1) <> vbNullString
Sheets("Sheet1").Rows(mI).Copy
Sheets("Sheet2").Select
Rows(mI * 2).Select
ActiveSheet.Paste
mI = mI + 1
Wend
End Sub

austenr
09-30-2005, 04:00 PM
Great...exactly what I needed. SOLVED