+ Reply to Thread
Results 1 to 3 of 3

how to fill formula in any cell and drag it?

  1. #1
    Forum Contributor
    Join Date
    07-18-2006
    Posts
    135

    Question how to fill formula in any cell and drag it?

    hi everyone,

    Please help me as following:
    - i wanna use VBA to fill automatically a formula in any cell i don't know before
    - then, drag that cell to right 2 cells more
    - after that, select 3 cells, drag all of them down to last row - 4, because amount of rows update frequently. last row of formula is last row -4.

    thanks in advance.

  2. #2
    NickHK
    Guest

    Re: how to fill formula in any cell and drag it?

    Did you try recoding a macro ?
    I got this:

    Range("C7").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "=SUM(R[-4]C:R[-1]C)"
    Range("C7").Select
    Selection.AutoFill Destination:=Range("C7:E7"), Type:=xlFillDefault
    Range("C7:E7").Select
    Selection.AutoFill Destination:=Range("C7:E10"), Type:=xlFillDefault
    Range("C7:E10").Select

    NickHK

    "vumian" <[email protected]> wrote in
    message news:[email protected]...
    >
    > hi everyone,
    >
    > Please help me as following:
    > - i wanna use VBA to fill automatically a formula in any cell i don't
    > know before
    > - then, drag that cell to right 2 cells more
    > - after that, select 3 cells, drag all of them down to last row - 4,
    > because amount of rows update frequently. last row of formula is last
    > row -4.
    >
    > thanks in advance.
    >
    >
    > --
    > vumian
    > ------------------------------------------------------------------------
    > vumian's Profile:

    http://www.excelforum.com/member.php...o&userid=36494
    > View this thread: http://www.excelforum.com/showthread...hreadid=570009
    >




  3. #3
    Forum Contributor
    Join Date
    07-18-2006
    Posts
    135

    Question

    hi man,

    thanks for your help, but

    i mean, i drag down to last rows-4. it does not mean to drag down 4 row

    thanks for help one more.

+ 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