+ Reply to Thread
Results 1 to 6 of 6

Can we link two cells so that changes in one leads to changes in another both ways?

  1. #1
    Forum Contributor
    Join Date
    03-31-2010
    Location
    Norway
    MS-Off Ver
    Excel 365
    Posts
    632

    Can we link two cells so that changes in one leads to changes in another both ways?

    Hello everyone,

    I have made the following table:

    A2 = 10 000 B2 = 50% C2 = A2/(A2*B2) = 2

    So, if I change B2 to 25%, C2 changes to 4.

    This is all very fine, but I was wondering if it is possible to link the cells B2 and C2 in such a way that if I now would enter the value 5 in C2 I would get the corresponding value of 20% in B2.

    Is this possible at all or is there another solution? Perhaps adding one extra cell?

    My life does not depend on this, but it would be very cool if this is possible.

    Thanks very much in advance. I`ve been scratching my head on this one for a while

    Elijah

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Can we link two cells so that changes in one leads to changes in another both way

    Hello Elijah,

    welcome to the forum.

    A cell either holds a value or a formula. If you overwrite the formula with a value, then the formula is gone.

    To achieve what you describe, you would need VBA to do the calculation and then populate the cells with the respective values.

  3. #3
    Forum Contributor
    Join Date
    03-31-2010
    Location
    Norway
    MS-Off Ver
    Excel 365
    Posts
    632

    Re: Can we link two cells so that changes in one leads to changes in another both way

    Hey teylyn,

    Thank you for clarifying that.

    How much work would it be to do this with VBA (never used it before and don`t know any programming)?

    It`s not that important for me, but it would be a cool feature.

    Best regards,

    Elijah
    Last edited by teylyn; 04-02-2010 at 12:21 AM. Reason: removed spurious quote

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Can we link two cells so that changes in one leads to changes in another both way

    Please don't quote whole posts. It's just clutter.

    You could post an example file and specify the cells and the formulas that are involved, someone here will come up with the macro within a day or so. You can upload a file by clicking "Go Advanced" below the Quick Reply box and then the paper clip icon.

    If you want to do it on your own, you may need a few weeks to dig deeply enough into the ins and outs of VBA.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Can we link two cells so that changes in one leads to changes in another both way

    Quote Originally Posted by Elijah
    How much work would it be to do this with VBA (never used it before and don`t know any programming)?
    In VBA terms you would use the Change event of the appropriate sheet object, eg:

    Please Login or Register  to view this content.
    To insert the above - from native XL right click on the tab against which the above code is to be applied - select View Code and paste above into resulting window.
    Thereafter (in a macro enabled file) altering either B2/C2 should update the appropriate cells with revised values.

  6. #6
    Forum Contributor
    Join Date
    03-31-2010
    Location
    Norway
    MS-Off Ver
    Excel 365
    Posts
    632

    Re: Can we link two cells so that changes in one leads to changes in another both way

    Hey guys,

    You are all very helpful. Many thanks!

    Regards,

    Elijah

+ 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