Thread: Excel VBA Help
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default Excel VBA Help


Here's one way:

Sub test()

With ActiveSheet.Range("A65536")
.End(xlUp).Copy .EntireColumn.SpecialCells(xlCellTypeBlanks)(1)
End With

End Sub


--
Hope that helps.

Vergel Adriano


" wrote:

Hi I am trying to find the last used cell in column A - copy it, then find
the last blank cell in column A and paste it.

Tried this - but no joy.

'find last cell with data in Column A and copy cell
LastRowColA = Range("A65536").End(xlUp).Row
Selection.Copy


' find first empty cell in column A - then paste in cell contents of above
iRow = ws.Cells(Rows.Count, 1) _
..End(xlUp).Offset(1, 0).Row
ActiveSheet.Paste

ANY IDEAS ANYONE?

Many thanks

Paul T