Select case and Last Cell Problem

  • Thread starter Thread starter JamesBurrows
  • Start date Start date
J

JamesBurrows

Hi

I am fairly new to VBA so be gentle. I have been working on the
attached code but am struggling with the CASE SELECT and the loop.

I am trying to search column B of Line List worksheet and if it
contains a letter ie is not blank copying it to another worksheet Tags
CSV.

I am also trying to loop this process until the end of my data but as
my data has gaps between it i need to go to the bottom or (1500 row in
column b of line list) move up one until a non blank row is found then
return a rown number as a value in order to stop my loop when it gets
there.

God I hope this makes sense to you lot as its sending me in circles.

I look forward to your response


+-------------------------------------------------------------------+
|Filename: Excel Help.doc |
|Download: http://www.excelforum.com/attachment.php?postid=4849 |
+-------------------------------------------------------------------+
 
Hi James
God I hope this makes sense
I try<g>

Assume you not have formulas in the column
This will copy every row with data in column A to Sheets("Sheet2").Range("A1")


Sub test()
On Error Resume Next
Columns("A").SpecialCells(xlCellTypeConstants).EntireRow.Copy Sheets("Sheet2").Range("A1")
On Error GoTo 0
End Sub
 
Thanks for that Ron the only thing is there are some rows with data in
that I dont want to copy I only want to copy the lines across that have
a letter in them, some have a few words in
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top