+ Reply to Thread
Results 1 to 10 of 10

Formula written as Macro

  1. #1
    Forum Contributor
    Join Date
    12-23-2009
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    180

    Formula written as Macro

    Hello Guys,

    I have one question for you,

    I want to exucute formula in cell A1 (and A2 also) in whole column A,off course formula should be change as row number changes,

    can you do this thru the Macro somehow?


    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula written as Macro

    why not just fill the formula down?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    12-23-2009
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Formula written as Macro

    Actually i tried to rewrite my formulas in workbooks as Macro and execute them,can i do this somehow

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula written as Macro

    you really want the formulas to go down to row 1048576

  5. #5
    Forum Contributor
    Join Date
    12-23-2009
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Formula written as Macro

    No,enough is 10 000 rows

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula written as Macro

    so is the formula already there or does it have to be included in the macro
    maybe something like this
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    12-23-2009
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Formula written as Macro

    Thank you it works..

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,897

    Re: Formula written as Macro

    If you're going to use a macro to drop formulae into a column, you don't really need to use FillDown

    This will do the same thing:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula written as Macro

    saves typing!

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,897

    Re: Formula written as Macro

    @Martin: maybe


    @ALEZI

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Can this macro be written more efficiently?
    By alpinesd in forum Excel General
    Replies: 4
    Last Post: 06-16-2012, 02:46 AM
  2. Requesting a Macro to be written
    By Robert1955 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-13-2012, 08:19 AM
  3. Formula/Macro to separate dates (written in text strings)
    By jologstol in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-09-2008, 10:42 AM
  4. I have never written a macro
    By wickd03 in forum Excel General
    Replies: 2
    Last Post: 03-27-2006, 12:40 AM
  5. RE: I have never written a macro
    By wickd03 in forum Excel General
    Replies: 0
    Last Post: 03-26-2006, 06:45 PM

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