Thread: loop?
View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default loop?

Worksheets("Sheet1").Columns(1).Copy _
destination:=.Range("A1")

Or

Worksheets("Sheet1").Columns(1).Copy .Range("A1") '<--note the spaces!

scaredycat wrote:

Sorry guys... it still doesn't like that line i've now got a message saying
"runtime error 424 object required" what does that mean?

"Bob Phillips" wrote:

You missed the other one

Worksheets("Sheet1").Columns(1).Copy.Range("A1")


--
__________________________________
HTH

Bob

"Susan" wrote in message
...
typo.......

Worksheets("Sheet1")Column(1).Copy .Range("A1")
should be
Worksheets("Sheet1").Column(1).Copy.Range("A1")

:)
susan


On Jun 24, 3:02 pm, "Bob Phillips" wrote:
With Worksheets("Sheet2")

Worksheets("Sheet1")Column(1).Copy .Range("A1")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = LastRow To 2 Step -1

If .Cells(i, "A").Value = "" Then

.Rows(i).Delete
End If
Next i
End With

--
__________________________________
HTH

Bob

"scaredycat" wrote in message

...



can you help me
i'm trying to create a macro that will loop through all the data in a
user
specified column/row and return on a new sheet all non-blank data from
that
selected colum or row with the relevant row/column headers as appear on
original sheet.

I'm a bit new to this sorry!- Hide quoted text -

- Show quoted text -





--

Dave Peterson