+ Reply to Thread
Results 1 to 4 of 4

Cell A = Cell B; CellB = CellA

  1. #1
    Registered User
    Join Date
    05-04-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    3

    Cell A = Cell B; CellB = CellA

    Hello Guys.

    I am trying to make 2 cells equal too each other regardless of where I input the value ( A or B).

    Here is the code I am currently trying.

    The code does seem to be doing the task. However, excel is crashing after running this code.
    Please Login or Register  to view this content.
    Thank you.
    E.
    Last edited by gomez87; 05-14-2014 at 08:45 AM.

  2. #2
    Registered User
    Join Date
    06-25-2013
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: Cell A = Cell B; CellB = CellA

    Quote Originally Posted by gomez87 View Post
    Hello Guys.

    I am trying to make 2 cells equal too each other regardless of where I input the value ( A or B).

    Here is the code I am currently trying.

    The code does seem to be doing the task. However, excel is crashing after running this code.

    Private Sub Worksheet_Change(ByVal Target As Range)

    Please Login or Register  to view this content.
    Thank you.
    E.
    Your code is handling change events, but is then changing the worksheet which in turn causes a change event,etc. Maybe try this. Before making a change in your sub, Application.EnableEvents = False, and then before the end of the Sub, Application.EnableEvents = True

  3. #3
    Registered User
    Join Date
    05-04-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Cell A = Cell B; CellB = CellA

    That did the trick.

    Thank you!

    Quote Originally Posted by klvaughnsd View Post
    Your code is handling change events, but is then changing the worksheet which in turn causes a change event,etc. Maybe try this. Before making a change in your sub, Application.EnableEvents = False, and then before the end of the Sub, Application.EnableEvents = True

  4. #4
    Registered User
    Join Date
    06-25-2013
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: Cell A = Cell B; CellB = CellA

    Quote Originally Posted by gomez87 View Post
    That did the trick.

    Thank you!
    You're welcome!

+ 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. If "value" then copy from "cellA" to "cellB" drag down issues
    By mrmeeks in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2014, 12:34 PM
  2. [SOLVED] Add data in cell A to the front of data in cellB
    By cvacek@kw.com in forum Excel General
    Replies: 3
    Last Post: 01-30-2014, 12:56 PM
  3. If cellA equals range of values in cell c1-c999 return D?
    By Blaino in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-20-2013, 07:13 AM
  4. Replies: 2
    Last Post: 09-28-2012, 05:56 PM
  5. CellA = CellB only if CellB has text
    By buddhajb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-27-2008, 01:34 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