+ Reply to Thread
Results 1 to 8 of 8

cells updated automatically

  1. #1
    Forum Contributor
    Join Date
    12-09-2006
    Posts
    229

    cells updated automatically

    I would like to know if there is a way if I change one cell and the other cells would change automatically. For example, if I change the value in B2 (input_data) tab from 0 to 1 the values in C2 and D2 will change automatically to 0 and the same thing should happen if do the changes in the other cells, for example if I change the value in D2 the other cells C2 and Be will change.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,368

    Re: cells updated automatically

    Hi walid66,

    If C2 and D2 have formulas in them that are based on the value in B2 they will change. Excel does this best.

    If you need to have non-formulas in C2 and D2 and base them on other conditions you can write some VBA code that services the change in an Event Macro.

    See http://www.ozgrid.com/VBA/vba-intersect.htm and the On Change Event in http://www.cpearson.com/excel/Events.aspx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    12-09-2006
    Posts
    229

    Re: cells updated automatically

    I am looking for VBA code to do these changes since I have big number to changes.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,368

    Re: cells updated automatically

    Hi walid66,

    I apologize but, I must have taken a sour pill this morning. Did you have a question in your last post? Did you want us to write some VBA code to do something? What exactly was the VBA code supposed to do? In looking at your example sheet and I'm clueless on what a 0 or 1 in the cell would change and what criteria you might use for any VBA code.

    I'm sorry but you haven't given us a good enough explanation of your problem or expected results to do much more. Do you have a question we could answer? (note the question mark at the end of the last sentence)

  5. #5
    Forum Contributor
    Join Date
    12-09-2006
    Posts
    229

    Re: cells updated automatically

    I did this script and it work fine on column by column bases. If I remove the comment on the other columns the script won't work. The whole purpose of the script is if I want change the value one to zero the other column in the next to the target goes to zero. For example if I want to change cell B2 to one 1cell C2 and D2 they change to zero.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,368

    Re: cells updated automatically

    I still don't see a question mark in your last post. Was there supposed to be a question or did you just want us to read your code?

  7. #7
    Forum Contributor
    Join Date
    12-09-2006
    Posts
    229

    Re: cells updated automatically

    read my code to see why I am getting the error when I remove the comments.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,368

    Re: cells updated automatically

    Was there a question?
    Last edited by MarvinP; 02-20-2011 at 06:21 PM.

+ 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