Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

End(xlDown). Question in Excel

Posted on 2013-10-31
3
Medium Priority
?
619 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

718 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