View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Find next cloumn

Hi L,

Try:

With Worksheets("Current")
.Range("B2").Copy Destination:= _
.Range("Z4").End(xlToLeft)(1, 2)
End With

I assume that Range("ZZ4"). was a typo, as Excel only has 256 columns.

---
Regards,
Norman



"L.White" wrote in message
...
Hello everyone,

I want to find the last column in a row that has information in it. I
wrote out the following

Worksheets("Current").Range("B2") _
.Copy Destination:= _
Worksheets("Current").Range("ZZ4").End(xlLeft)(1)

But have it wrong. I have used this in the past

Worksheets("SQL").Cells(rowSource, "A") _
.Copy Destination:= _
Worksheets("QUOTE").Range("G300").End(xlUp)(2)

So what is the command to look from right to left?

For that matter, is there a good list of Excel VBA commands to reference?
I have a function list spreadsheet that gives all of the functions and how
to write them (thanks to Norman Harker MVP for providing that), is there a
similar document running around for VBA commands?

LWhite