+ Reply to Thread
Results 1 to 5 of 5

cut & paste swapping contents - keyboard shortcut ?

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    LA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    99

    Question cut & paste swapping contents - keyboard shortcut ?

    I'm doing a lot of corrections for mixed up information. Is there a function that will cut and paste a cell's contents and automatically push the destination's cells contents to the original cell. Swapping essentially.. if that does exists, I'd assume I could assign a custom keyboard shortcut to the task. Any ideas would be great . thanks !

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: cut & paste swapping contents - keyboard shortcut ?

    Why dont you attach a sample file with some dummy data?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: cut & paste swapping contents - keyboard shortcut ?

    Hi - this macro should swap the contents of two selected cells
    One of the better VBA people can probably come up with a more elegant solution - my way of returning the values of selected cells is clumsy (but it works, I hope)


    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-07-2012
    Location
    LA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    99

    Re: cut & paste swapping contents - keyboard shortcut ?

    thanks a lot NickyC,

    I've worked with formulas in new columns, but where would I add this formula? I couldn't figure it out

    ... also, I'm attaching a sample/dummy file. The culprits are highlighted in red text

    Thanks you guys

    Fake sample-Employee List.xls

  5. #5
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: cut & paste swapping contents - keyboard shortcut ?

    Hi
    it's a macro not a formula, so you will have to copy it into a module in VBA

    • press alt+f11 to enter the visual basic area
    • select insert>module to create a module to store your macro
    • paste the code into the module
    • return to the sheet and select developer > macros
    • select the macro name and press "run"

    if the developer tab is not visible at the top of the sheet, press the office button at the top left and select excel options > popular > and click the "show developer tab in the ribbon" check box

    You may also need to change the macro security settings under the developer tab when you return to the sheet to allow the macro to run

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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