+ Reply to Thread
Results 1 to 4 of 4

Macro on Excel!?

Hybrid View

  1. #1
    Registered User
    Join Date
    01-10-2006
    Posts
    67

    Macro on Excel!?

    Hello I have a simple problem I want to create a macro so that instead of dragging the formulae down to create a copy....

    =E11/F11 I want to put this formula in G11, now the problem is i want to make this formula apply to the other cells below such as:

    =E12/F12 in G12 etc etc like this all the way down, instead of dragging it can i make a macro if so can anyone explain please

    Thanks for your time
    From John Wood

  2. #2
    Beege
    Guest

    Re: Macro on Excel!?

    Neo,
    If you select the column, you can Edit/Fill/Down
    Beege

    "Neo1" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello I have a simple problem I want to create a macro so that instead
    > of dragging the formulae down to create a copy....
    >
    > =E11/F11 I want to put this formula in G11, now the problem is i
    > want to make this formula apply to the other cells below such as:
    >
    > =E12/F12 in G12 etc etc like this all the way down, instead of
    > dragging it can i make a macro if so can anyone explain please
    >
    > Thanks for your time
    > From John Wood
    >
    >
    > --
    > Neo1
    > ------------------------------------------------------------------------
    > Neo1's Profile:
    > http://www.excelforum.com/member.php...o&userid=30329
    > View this thread: http://www.excelforum.com/showthread...hreadid=506971
    >




  3. #3
    Dave Peterson
    Guest

    Re: Macro on Excel!?

    You have to be able to tell the macro when to stop.

    Option Explicit
    sub Testme01()
    dim LastRow as long
    dim wks as worksheet
    set wks = worksheets("Sheet1")

    with wks
    lastrow = .cells(.rows.count,"A").end(xlup).row
    .range("G11:G" & lastrow).formula = "=e11/f11"
    end with

    end sub

    This fills that range all at once with the formula.

    You could record a macro when you type the formula once and then fill it down,
    too. You'll get different code, but it should work.

    Neo1 wrote:
    >
    > Hello I have a simple problem I want to create a macro so that instead
    > of dragging the formulae down to create a copy....
    >
    > =E11/F11 I want to put this formula in G11, now the problem is i
    > want to make this formula apply to the other cells below such as:
    >
    > =E12/F12 in G12 etc etc like this all the way down, instead of
    > dragging it can i make a macro if so can anyone explain please
    >
    > Thanks for your time
    > From John Wood
    >
    > --
    > Neo1
    > ------------------------------------------------------------------------
    > Neo1's Profile: http://www.excelforum.com/member.php...o&userid=30329
    > View this thread: http://www.excelforum.com/showthread...hreadid=506971


    --

    Dave Peterson

  4. #4
    CLR
    Guest

    RE: Macro on Excel!?

    If you have the data in cell F12 and below, then only have to double-click on
    the little black square in the lower right hand corner of G11 after you enter
    the formula there, and the formulas will fill down as far as there is data
    in column F.

    Vaya con Dios,
    Chuck, CABGx3



    "Neo1" wrote:

    >
    > Hello I have a simple problem I want to create a macro so that instead
    > of dragging the formulae down to create a copy....
    >
    > =E11/F11 I want to put this formula in G11, now the problem is i
    > want to make this formula apply to the other cells below such as:
    >
    > =E12/F12 in G12 etc etc like this all the way down, instead of
    > dragging it can i make a macro if so can anyone explain please
    >
    > Thanks for your time
    > From John Wood
    >
    >
    > --
    > Neo1
    > ------------------------------------------------------------------------
    > Neo1's Profile: http://www.excelforum.com/member.php...o&userid=30329
    > View this thread: http://www.excelforum.com/showthread...hreadid=506971
    >
    >


+ 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