+ Reply to Thread
Results 1 to 4 of 4

Macro modification

Hybrid View

Guest Macro modification 05-27-2005, 01:05 PM
Guest Re: Macro modification 05-27-2005, 02:05 PM
Guest Re: Macro modification 05-27-2005, 05:05 PM
Guest Re: Macro modification 05-27-2005, 06:05 PM
  1. #1
    Hirsch
    Guest

    Macro modification

    Dim rngDataRange As Range

    ActiveSheet.UsedRange.Select
    Selection.Offset(0, 19).Select
    Set rngDataRange = Selection

    Range("T1").Select
    Cells(1, 20).Copy
    rngDataRange.Offset(0, 0).Resize(1, 1).Select
    ActiveSheet.Paste
    rngDataRange.Offset(0, 0).Select
    Selection.FillDown

    This is a portion of a macro I'm working on. The intent is to dump a
    formula in cell T1, and use a fill down. Although this fill down
    incorporates column T and 18 additional columns. What needs to be modified
    to just have Column T fill down.

  2. #2
    Bob Phillips
    Guest

    Re: Macro modification

    Try this

    Dim rngDataRange As Range

    Set rngDataRange = ActiveSheet.UsedRange.Offset(0, 19).Resize(, 1)
    Cells(1, 20).Copy rngDataRange.Cells(1, 1)
    rngDataRange.FillDown


    --
    HTH

    Bob Phillips

    "Hirsch" <Hirsch@discussions.microsoft.com> wrote in message
    news:18565BD6-7043-4BE7-8CA5-67D53C88F91B@microsoft.com...
    > Dim rngDataRange As Range
    >
    > ActiveSheet.UsedRange.Select
    > Selection.Offset(0, 19).Select
    > Set rngDataRange = Selection
    >
    > Range("T1").Select
    > Cells(1, 20).Copy
    > rngDataRange.Offset(0, 0).Resize(1, 1).Select
    > ActiveSheet.Paste
    > rngDataRange.Offset(0, 0).Select
    > Selection.FillDown
    >
    > This is a portion of a macro I'm working on. The intent is to dump a
    > formula in cell T1, and use a fill down. Although this fill down
    > incorporates column T and 18 additional columns. What needs to be

    modified
    > to just have Column T fill down.




  3. #3
    Hirsch
    Guest

    Re: Macro modification

    Thank you very much... it was perfect... I just struggle with these macros.

    Thanks again

    "Bob Phillips" wrote:

    > Try this
    >
    > Dim rngDataRange As Range
    >
    > Set rngDataRange = ActiveSheet.UsedRange.Offset(0, 19).Resize(, 1)
    > Cells(1, 20).Copy rngDataRange.Cells(1, 1)
    > rngDataRange.FillDown
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > "Hirsch" <Hirsch@discussions.microsoft.com> wrote in message
    > news:18565BD6-7043-4BE7-8CA5-67D53C88F91B@microsoft.com...
    > > Dim rngDataRange As Range
    > >
    > > ActiveSheet.UsedRange.Select
    > > Selection.Offset(0, 19).Select
    > > Set rngDataRange = Selection
    > >
    > > Range("T1").Select
    > > Cells(1, 20).Copy
    > > rngDataRange.Offset(0, 0).Resize(1, 1).Select
    > > ActiveSheet.Paste
    > > rngDataRange.Offset(0, 0).Select
    > > Selection.FillDown
    > >
    > > This is a portion of a macro I'm working on. The intent is to dump a
    > > formula in cell T1, and use a fill down. Although this fill down
    > > incorporates column T and 18 additional columns. What needs to be

    > modified
    > > to just have Column T fill down.

    >
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: Macro modification

    and simpler :-)

    --
    HTH

    Bob Phillips

    "Hirsch" <Hirsch@discussions.microsoft.com> wrote in message
    news:9BBBFA58-2946-41DC-AE9C-AA6A41059FE1@microsoft.com...
    > Thank you very much... it was perfect... I just struggle with these

    macros.
    >
    > Thanks again
    >
    > "Bob Phillips" wrote:
    >
    > > Try this
    > >
    > > Dim rngDataRange As Range
    > >
    > > Set rngDataRange = ActiveSheet.UsedRange.Offset(0, 19).Resize(, 1)
    > > Cells(1, 20).Copy rngDataRange.Cells(1, 1)
    > > rngDataRange.FillDown
    > >
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > "Hirsch" <Hirsch@discussions.microsoft.com> wrote in message
    > > news:18565BD6-7043-4BE7-8CA5-67D53C88F91B@microsoft.com...
    > > > Dim rngDataRange As Range
    > > >
    > > > ActiveSheet.UsedRange.Select
    > > > Selection.Offset(0, 19).Select
    > > > Set rngDataRange = Selection
    > > >
    > > > Range("T1").Select
    > > > Cells(1, 20).Copy
    > > > rngDataRange.Offset(0, 0).Resize(1, 1).Select
    > > > ActiveSheet.Paste
    > > > rngDataRange.Offset(0, 0).Select
    > > > Selection.FillDown
    > > >
    > > > This is a portion of a macro I'm working on. The intent is to dump a
    > > > formula in cell T1, and use a fill down. Although this fill down
    > > > incorporates column T and 18 additional columns. What needs to be

    > > modified
    > > > to just have Column T fill down.

    > >
    > >
    > >




+ 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