+ Reply to Thread
Results 1 to 7 of 7

Cut and Paste Options?

  1. #1
    Registered User
    Join Date
    07-31-2008
    Location
    California
    Posts
    10

    Cut and Paste Options?

    Hello,

    Here's a process I do frequently with my Excel spreadsheets and I'm hoping to eliminate a step:

    I am transferring a row from one Excel spreadsheet to another by using the "cut and paste" method. On the original spreadsheet I right-click on the far left-hand numbered column (which highlights the entire row), select "Cut" and then use the same method to paste it into another spreadsheet.

    What I'd like to happen is have the entire row from the first spreadsheet disappear, as opposed to just the content being deleted. This way I don't have to go back to this orginal spreadsheet after the "cut and paste" sequence to delete the row manually. Is there a way to make this happen?
    Last edited by VBA Noob; 07-31-2008 at 02:12 PM.

  2. #2
    Registered User
    Join Date
    03-13-2007
    Posts
    71
    Is it always the same row(s) or will they vary each time?

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    You'll need to have a macro to do that. I set up a macro (see attached) with the shortcut CNTRL + SHIFT + V which you'd need to call (through that shortcut) where you've selected the row you want to paste into but before you paste.

    The macro pastes the row, returns to the original sheet (in this case "Inventory") and deletes the original row.. Try it with my example. Is that what you want?

    ChemistB
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-31-2008
    Location
    California
    Posts
    10
    Quote Originally Posted by howardjo
    Is it always the same row(s) or will they vary each time?
    They will vary in content--it's two inventory sheets I work with. I would love to find a way to keep the formulas on the receiving page's column "fixed" when I paste the incoming row on that page. As it is, the row I paste brings with it it's formula.

  5. #5
    Registered User
    Join Date
    07-31-2008
    Location
    California
    Posts
    10
    Quote Originally Posted by ChemistB
    You'll need to have a macro to do that. I set up a macro (see attached) with the shortcut CNTRL + SHIFT + V which you'd need to call (through that shortcut) where you've selected the row you want to paste into but before you paste.

    The macro pastes the row, returns to the original sheet (in this case "Inventory") and deletes the original row.. Try it with my example. Is that what you want?

    ChemistB
    Yes, that works perfect in your example. Do I need to create a macro for my file, or is it possible to use this one? Again, newbie!

    Also, as I asked as a follow-up question, is there a way to "force" the rows being pasted on a sheet to take on the formula that is already there? In your example it would be as if the "Sheet 1" column J, for example, had a formula running down its length to give total sales down lower. What I'd like to happen is as I add rows from the "Inventory sheet", that row would take on the formula when it's pasted in place. As it is, the rows bring in their own formulas, or leave the cell blank.

    Any ideas?

    BTW, thanks for the help so far. I think I'm on to something.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    In order to have it paste values only, first, you need to use Copy instead of Cut and then substitute
    Please Login or Register  to view this content.
    in my macro with
    Please Login or Register  to view this content.
    If you follow the directions in my post, it doesn't matter what row you are pasting from or to. It will paste the values into the row you selected and then go back and delete the original row.

    ChemistB

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Yes, that works perfect in your example. Do I need to create a macro for my file, or is it possible to use this one? Again, newbie!

    Also, as I asked as a follow-up question, is there a way to "force" the rows being pasted on a sheet to take on the formula that is already there? In your example it would be as if the "Sheet 1" column J, for example, had a formula running down its length to give total sales down lower. What I'd like to happen is as I add rows from the "Inventory sheet", that row would take on the formula when it's pasted in place. As it is, the rows bring in their own formulas, or leave the cell blank.
    You can copy my macro over to your workbook (Alt F11 to access the macro editor, then find the macro in Module 1 and insert a module into your workbook and paste it..

    If I understand you correctly, on the sheet you want to paste to, you already have formulas that you don't want to overwrite? That will be more complicated. You are, by definition, pasting over what was already there. Maybe I can help if you post an example of how your workbook is set up.

    ChemistB

+ 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