Thread: loop?
View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default loop?

Isn't that just what it does, copy column A, without the blanks?

--
__________________________________
HTH

Bob

"scaredycat" wrote in message
...

Sorry I just got the answer to that last bit and the good news is it
works...yay:), the only thing is though it only specifies the column
headers
and row names it doesn't filter the data in those columns/rows by
non-blank
values and remove the unnecessary ones.

I'm not very good at explaining things sorry, so for examples sake if a
user
clicks on a row name I want to copy to a seperate sheet all the non-blank
columns and values for that row, and likewise for selecting a column i
want
to filter that column by all the non-blank values and copy those values
with
the row names (so that the data is meaningful) to a seperate sheet.

Does this make any sense, i'm sorry to take up your time.

Yours gratefully

scaredycat :)
"scaredycat" wrote:

Thanks guys for all your help, but I still can't get it to work, what
object
do I need to define....i'm sorry to bother you further but thank you so
much
for your help so far

Thanks :)

"Susan" wrote:

yep, i got the & the space, but missed the s on the columns.......
LOL
susan


On Jun 24, 3:25 pm, "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 -- Hide quoted text -

- Show quoted text -