Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Last row plus one

range("a1").end(xldown).offset(1,0)

This works, but it asks me to put and "="...how can I make this work to
paste a previous selection?

Many thanks in advance
Alex

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Last row plus one

You need to set a variable to the result of your line of code, or
assign a value to it. E.g.,


Dim Rng As Range
Set Rng = range("a1").end(xldown).offset(1,0)
' or
range("a1").end(xldown).offset(1,0) = 123


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"Alex Martins" wrote in
message
...
range("a1").end(xldown).offset(1,0)

This works, but it asks me to put and "="...how can I make this
work to
paste a previous selection?

Many thanks in advance
Alex



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Last row plus one

Hey Chip. Thanks for the answer man.

This is what I've been doing and I can't get it to work. Do you have any
ideas?
Dim Rng As Range
Set Rng = Sheets("BD1").Range("C5").End(xlDown).Offset(1, 0)
Sheets("NEW FILINGS").Range("K12:O12").Select
Selection.Copy
Range("Rng").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub

Thanks for the help, and your site was really helpful man!
Alex


"Chip Pearson" wrote:

You need to set a variable to the result of your line of code, or
assign a value to it. E.g.,


Dim Rng As Range
Set Rng = range("a1").end(xldown).offset(1,0)
' or
range("a1").end(xldown).offset(1,0) = 123


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"Alex Martins" wrote in
message
...
range("a1").end(xldown).offset(1,0)

This works, but it asks me to put and "="...how can I make this
work to
paste a previous selection?

Many thanks in advance
Alex




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"