Dear Ali, Thanks for posting question. I think you are missing spaces during the concatenation of strings. Please refer to below code. It should work. Let us know if any further assistance is required.
Sub Ali() Dim lastrow As Integer lastrow = Sheets(1).Range("E1000000").End(xlUp).Row Sheets(1).Range("E" & lastrow & ":O20").Select 'Refer this line Selection.Copy Sheets(2).Range("E25").PasteSpecial End Sub I hope it helps. Best regards, Ayush Jain Microsoft MVP Group Manager. Note :- Please keep group email in all your communications. Thanks. On Tue, Dec 7, 2010 at 5:00 AM, ali <muhammadali.s...@gmail.com> wrote: > Hello, > > I would love to know from some guru an easiest way to do the > following; > > I am making an automation with the help of Macros, I stuck on the > following point. > > Through the macro I want to copy a range of data from one sheet [POF] > to another [Order]. > > Range("E24:O20") > > but not simple as this, the '24' in above equation will come through a > variable [LstRow] > > So, I am assuming to get something like this; > > > Range("E"&LstRow&":O20").Select > > But it throws an error; > > Compile Error: > Expected: List seperator or ) > > Kindly help > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts > -- Best regards, Ayush Jain -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts