Solved

End(xlDown). Question in Excel

Posted on 2013-10-31
3
522 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 48

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 48

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now