Solved

End(xlDown). Question in Excel

Posted on 2013-10-31
3
558 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
  • 2
3 Comments
 
LVL 50

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 50

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

830 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