@SiddharthRout Yes I only need the rows that have data. I think I have it working now with End(xlToLeft) from @JMax ... Now that I'm iterating over the cells, I can just quit the For each loop once the last row is reached. I might have this working now. – makerofthings7 14 mins ago
For this neither you need .SpecialCells
nor do you need to loop through the rows :)
Here is a sample code. This will copy all the rows which have data to Sheet2 (TRIED AND TESTED)
Sub Sample()
Dim ws As Worksheet
Dim rng As Range
Dim LastRow As Long, LastCol As Long
Set ws = Sheets("Sheet1")
With ws
LastRow = .Cells.Find(What:="*", After:=.Range("A1"), Lookat:=xlPart, _
LookIn:=xlFormulas, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Row
LastCol = .Cells.Find(What:="*", After:=.Range("A1"), Lookat:=xlPart, _
LookIn:=xlFormulas, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, _
MatchCase:=False).Column
With .Range("A1:" & Split(Cells(, LastCol).Address, "$")(1) & LastRow)
.AutoFilter Field:=1, Criteria1:="<>"
Set rng = ws.AutoFilter.Range
rng.Offset(1, 0).Resize(rng.Rows.Count - 1).Copy _
Destination:=Sheets("Sheet2").Range("A1")
End With
End With
End Sub
SNAPSHOT

I am assuming that all cells in a particular row will have data and there won't be a case like this
@makerofthings7: I think I know what exactly you are trying to do :) you don't need to use loops to achieve what you want. Just a quick question. Is it possible that say Cell C10 might have a value but B10 might not? – Siddharth Rout 12 mins ago
If there is then we will have to set the autofilter criteria accordingly.
Edit:
*WAY 2*
The other way would be to sort your data, pushing the blanks way down and then copying the resulting range :)
HTH
Intersect
too and/or End(xlToLeft) – JMax Apr 7 '12 at 6:24Range("A65536")
I assume that you are using Excel 2003 (Tag says 2007)? I agree with brettdj however the only problem is that there is a limit of 8192 areas that SpecialCells can handle in Excel 2003. See this link. support.microsoft.com/default.aspx?scid=kb;en-us;832293. Till the time it is under that limit, you'll be good to go. Noncontiguous cells that can be selected in Excel 2010 is 2,147,483,648 cells. So if you are using Excel 2010 then if you have even less to worry about :) – Siddharth Rout Apr 7 '12 at 12:41Rows.Count
for all Excel Versions instead of hardcoding the numbers. For exampleRange(A65536)
can be written asRange("A" & Rows.Count)
, which will work for all excel versions :) – Siddharth Rout Apr 7 '12 at 14:52