+ Reply to Thread
Results 1 to 6 of 6

Macro to switch two cells value

  1. #1
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Macro to switch two cells value

    I need macro that will basically store contents of cell once selected and on next selection store contents of that cell then paste the cell info from first selected cell into the second selected cell and the info from the second selected cell into the first then turn this feature off until active again

    Coding so far
    Please Login or Register  to view this content.
    edit: fix code brackets

  2. #2
    Registered User
    Join Date
    12-14-2012
    Location
    Czech Republic
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Macro to switch two cells value

    Hello Meabrams,

    you can try this:
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: Macro to switch two cells value

    Is there a way to have this without the input box

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro to switch two cells value

    Code in normal module :
    Please Login or Register  to view this content.
    Code in sheet module :
    Please Login or Register  to view this content.
    You need to call Sub Switcher_Start() everytime you want to do the switch (you can assign a keyboard shortcut to this sub if you use it a lot).

  5. #5
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: Macro to switch two cells value

    Works like a champ thank you

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro to switch two cells value

    You are welcome, glad to help.


    Regards

+ 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] Switch macro
    By drakaz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-07-2015, 01:01 AM
  2. Switch values of 2 cells
    By sepus in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-07-2013, 07:54 PM
  3. Macro Help to Autumatically Switch Cells when Conditional is True
    By VICEROY in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2013, 01:46 AM
  4. Switch the contents of two cells around
    By nebb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-27-2011, 01:00 PM
  5. Excel 2007 : IF Formula / Macro to switch order of cells
    By dadevil316 in forum Excel General
    Replies: 1
    Last Post: 04-13-2011, 12:44 PM
  6. Is there a way to switch data between two cells?
    By lhassell in forum Excel General
    Replies: 1
    Last Post: 05-26-2006, 01:25 PM
  7. [SOLVED] Switch cells on input
    By Dan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-18-2005, 12:42 AM

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