+ Reply to Thread
Results 1 to 5 of 5

Clone formula to other cells

  1. #1
    Registered User
    Join Date
    12-03-2019
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    21

    Clone formula to other cells

    Hello everyone,

    I have such a task and I do not know how to do it.

    I have a formula in cell B1.The formula is A1 + A2.
    I am looking for a method that I can "clone" formula from a parent cell(B1) to other cells.

    The whole thing is that B1 is like a parent formula and if I change in B1 to e.g. A1 + A3, It will change automatically G1 to formula F1 + F3 and get the data from F1 and F3.

    I know how to do it in VBA, but in this workbook I have to avoid it.

    Have any of you met with the same and can share your knowledge?
    Thanks in advance

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,750

    Re: Clone formula to other cells

    One way to do this is, instead of thinking about it as cloning a formula, put parameters someplace that all formulas will refer to.

    For example, if you want B1 to start as =A1+A2, then use H1, H2, I1, I2 to store displacement values. That is, A1 is 0 rows and 1 column from B1, so in H1 put 0 and H2 put 1. Same for A1. Then in B1 your formula is:

    =OFFSET(B1,$H$1,$H$2)+OFFSET(B1,$I$1,$I$2)

    Then you can copy and paste that formula to G1. Then when you change H1:I2, the results of both formulas will change.

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Clone formula to other cells

    Hi there,

    In my opinion, the most appropriate approach here is to use a defined name formula.

    It's not easy to explain a defined name formula in a few words here, but you should be able to find the information you need in links such as the following one:


    Hope this helps,

    Greg M

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Clone formula to other cells

    Hi again,

    The attached workbook contains an example of a simple worksheet-level named range formula (forSumTwoCells)

    At present the formula is defined as
    Please Login or Register  to view this content.
    and cells B6, B11 and B16 behave as if this formula had been copied there from cell B1.

    If the named range formula is amended to

    Please Login or Register  to view this content.
    then cells B6, B11 and B16 will be updated to reflect this.


    A VERY important point to note is that because the named range formula was defined when cell B1 was the active cell, the formula can be edited (meaningfully!) only when the active cell is B1.


    Hope this helps,

    Regards,

    Greg M
    Attached Files Attached Files

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Clone formula to other cells

    Hi again,

    Many thanks for the Reputation increase - much appreciated!

    Best regards,

    Greg M

+ 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. Clone Cell to Another if Selected
    By webiscore in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-15-2017, 07:01 PM
  2. How to "clone" a range of cells
    By TrippKnightly in forum Excel General
    Replies: 4
    Last Post: 12-11-2012, 03:51 PM
  3. Clone worksheet from one workbook to another?
    By csulli in forum Excel General
    Replies: 5
    Last Post: 08-18-2010, 03:17 PM
  4. Using copy/paste to clone cells
    By Mike47 in forum Excel General
    Replies: 3
    Last Post: 07-22-2010, 06:20 PM
  5. Clone an existing worksheet
    By Kop99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2009, 08:38 AM
  6. Replies: 0
    Last Post: 09-12-2009, 11:07 AM
  7. Best Technique to clone worksheet
    By Rich_z in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-06-2005, 03:05 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