+ Reply to Thread
Results 1 to 3 of 3

Copy down

  1. #1
    Registered User
    Join Date
    05-03-2005
    Posts
    16

    Copy down

    Hi,

    I need help with this code. I'm just learning about this, so maybe this is to basic, but I still need help!

    Here we go:

    In Column A I have a values that are going to chage every month. In one month I can have 1000 rows in another 200 rows of values.

    In Column B I'm going to have a formula on B1. I want to copy the formula down depending on the number of rows in Column A. I know I can use the AutoFill but I prefer to have a code that determines the range.

    Can you please help??

    Thanks in advance!!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello JSoto,

    Here is how to do it...

    'Find the Last Row in Column "A"
    LastRow = Cells(Rows.Count, "A').End(xlUp).Row

    'Auto Fill Cells B2 to LastRow with the Contents of B1
    Range("B1").AutoFill Destination:= Range("B2:B" & LastRow)

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    05-03-2005
    Posts
    16

    Talking

    This is great!! Thanks!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1