Solved

End(xlDown). Question in Excel

Posted on 2013-10-31
3
601 Views
Last Modified: 2013-11-01
Hi Guys, I have a simple copy and paste Macro that copies a Formula in the Range ("S3") and copies that Formula down. The problem is I need it to go down as far as the last row in Column D. How do I do that?


Worksheets("Rec").Select
Range("S3").Copy
    Selection.Copy
       Range(Selection, Selection.End(xlDown)).Select
    ActiveSheet.Paste
0
Comment
Question by:Justincut
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 39613739
Hi,

pls try

Worksheets("Rec").Range("S3:S" & Range("D" & Rows.Count).End(xlUp).Row).FillDown

Open in new window

Regards
0
 

Author Comment

by:Justincut
ID: 39613966
Does "FillDown" mean paste?

Range("S3").Select

 
    Range("S5:S" & Range("E" & Rows.Count).End(xlUp).Row).FillDown

   

    ActiveSheet.Paste
0
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39614240
Hi

Filldown is like grabbing the square at the bottom right of the cell to copy the content downwards

it is another way to copy and paste adjacent cells

if you want to copy in another region pls use

Sheets("rev").Range("S3").Copy Destination:=Sheets("rec").Range("S5:S" & (Sheets("rec").Range("D" & Rows.Count).End(xlUp).Row))

Open in new window


Regards
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question