View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Alex St-Pierre Alex St-Pierre is offline
external usenet poster
 
Posts: 169
Default Selection of data in a sheet

The function Range("A3", "IV3").CurrentRegion.Copy select the line 2 because
the line is not empty. Do you know how to exclude this line in the selection.
Thanks,
Alex St-Pierre

"voodooJoe" a écrit :

try:

Range("A3", "IV3").currentregion.copy
windows(mynewworkbook).sheets([insert "sheetname" or index
here]).range("a3").pastespecial xlpastevalues

this will select the block of contiguous cells
the only issue will be if there is a completely blank row between row 3 and
the last row in the data you want to copy

- voodooJoe

"Alex St-Pierre" wrote in message
...
Hi,
I have to copy data from one sheet to an other. I use the programmation
below. My problem is that sometimes, the colomn "A" is empty, so, the
"End(x1down) fonction doesn't work. I would like to select all lines from
line 3 to last line in database. I don't want to say Range("A3",
"IV65536")
because it slow down the process when copying the data.
Does anyone have an idea ?

Range(Range("A3", "IV3"), Range("A3", "IV3").End(xlDown)).Select
Selection.Copy
Windows(mynewworkbook).Activate
Range("A3").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False--

Thanks,
Alex St-Pierre