View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default How do I move cursor to next empty space??

go to the first empty column you have. then click the End button, then the
down arrow. This takes you to the bottom of the sheet. Now click on B65536

now click on End, then the Up Arrow. That is what this part of the code does:

Cells(65536, "b").End(xlup)

You should be able to figure out the rest.

--
Regards,
Tom Ogilvy


"WANNABE" wrote:

WOW!! Thanks James, That may be way over my head, but I will toy with it and
see what I can figure out... I have been trying something's that I am
familiar with and this is what I got to work...
Range("A2").Select
Do Until ActiveCell.Offset(0, 1).Value = ""
If ActiveCell.Value < "" Then
ActiveCell.Offset(1, 0).Range("A1").Select
Else
ActiveCell.Offset(-1, 0).Copy
ActiveCell.PasteSpecial
ActiveCell.Offset(1, 0).Range("A1").Select
End If
Loop
I was planning to post this and ask if there might be a better way, and I
think you have supplied that. Any additional notes would be helpful, I'm
sure you can tell from the code I pasted, what it is that I am doing.
Thanks Again!!!
AGAIN WOW one line, I never fail to be amazed....
=============================================
"Zone" wrote in message
oups.com...
Cells(65536, "b").End(xlUp).Offset(1, -1).Select
James
WANNABE wrote:
I am trying to populate cells from multiple CSV files into one XLS file
and
I need to locate the last cell with data in column B and move the cursor
to
the next row down in column A. Can someone tell me how to locate that
last
data cell ???