+ Reply to Thread
Results 1 to 4 of 4

Copy cells to variable number of rows

  1. #1
    Acct Supr - DCTC
    Guest

    Copy cells to variable number of rows

    I need to copy a formula (that a macro has entered at W3 & X3) down to the
    last row for that particuliar wk. I've figured out how to get the number of
    rows for that wk( in this case i=93, i will change for each wk) but can't
    figure out the syntax for the Range:

    Selection.Copy
    Range("W4: ? ").Select
    ActiveSheet.Paste

  2. #2
    Duke Carey
    Guest

    RE: Copy cells to variable number of rows

    instead of

    Selection.Copy
    Range("W4: ? ").Select
    ActiveSheet.Paste

    try

    range("W4:W"&i).filldown


    "Acct Supr - DCTC" wrote:

    > I need to copy a formula (that a macro has entered at W3 & X3) down to the
    > last row for that particuliar wk. I've figured out how to get the number of
    > rows for that wk( in this case i=93, i will change for each wk) but can't
    > figure out the syntax for the Range:
    >
    > Selection.Copy
    > Range("W4: ? ").Select
    > ActiveSheet.Paste


  3. #3
    Acct Supr - DCTC
    Guest

    RE: Copy cells to variable number of rows

    The .filldown didn't seem to work for me (likely something in the way I set
    things up) but when I put Select in its place it worked just the way I
    wanted. Thanks for the help. Do you know of a good book or class that help
    me getting better at writing Macros?

    "Duke Carey" wrote:

    > instead of
    >
    > Selection.Copy
    > Range("W4: ? ").Select
    > ActiveSheet.Paste
    >
    > try
    >
    > range("W4:W"&i).filldown
    >
    >
    > "Acct Supr - DCTC" wrote:
    >
    > > I need to copy a formula (that a macro has entered at W3 & X3) down to the
    > > last row for that particuliar wk. I've figured out how to get the number of
    > > rows for that wk( in this case i=93, i will change for each wk) but can't
    > > figure out the syntax for the Range:
    > >
    > > Selection.Copy
    > > Range("W4: ? ").Select
    > > ActiveSheet.Paste


  4. #4
    Duke Carey
    Guest

    RE: Copy cells to variable number of rows

    I haven't the experience with many Excel books in the last 5 years. Some
    people here have recommended John Walkenbach's books. You can read reviews
    at Amazon on Excel VBA books - there are lots of books to choose from.

    "Acct Supr - DCTC" wrote:

    > The .filldown didn't seem to work for me (likely something in the way I set
    > things up) but when I put Select in its place it worked just the way I
    > wanted. Thanks for the help. Do you know of a good book or class that help
    > me getting better at writing Macros?
    >
    > "Duke Carey" wrote:
    >
    > > instead of
    > >
    > > Selection.Copy
    > > Range("W4: ? ").Select
    > > ActiveSheet.Paste
    > >
    > > try
    > >
    > > range("W4:W"&i).filldown
    > >
    > >
    > > "Acct Supr - DCTC" wrote:
    > >
    > > > I need to copy a formula (that a macro has entered at W3 & X3) down to the
    > > > last row for that particuliar wk. I've figured out how to get the number of
    > > > rows for that wk( in this case i=93, i will change for each wk) but can't
    > > > figure out the syntax for the Range:
    > > >
    > > > Selection.Copy
    > > > Range("W4: ? ").Select
    > > > ActiveSheet.Paste


+ 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