ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   help with excel macro (https://www.excelbanter.com/excel-programming/299290-help-excel-macro.html)

Geir[_3_]

help with excel macro
 
I want to copy from E75 to I colum and go to next blank cell.
But tis does not work

Sub copytest(

Range("E75").Selec
Selection.Copy
Range("I" & Rows.Count).End(xlUp).Offset(1, 0

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
False, Transpose:=Fals
Application.CutCopyMode = Fals
End Sub

Bob Phillips[_6_]

help with excel macro
 
Sub copytest()
Dim cLastRow As Long

cLastRow = Cells(Rows.Count, "I").End(xlUp).Row

Range("E75").Copy
Range("I" & cLastRow).Offset(1, 0).PasteSpecial _
Paste:=xlValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False

End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Geir" wrote in message
...
I want to copy from E75 to I colum and go to next blank cell.
But tis does not work.

Sub copytest()

Range("E75").Select
Selection.Copy _
Range("I" & Rows.Count).End(xlUp).Offset(1, 0)

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,

SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End Sub




Geir[_3_]

help with excel macro
 
Thanks


All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com