+ Reply to Thread
Results 1 to 8 of 8

Cut/Paste data from one sheet to another based on cell context

  1. #1
    Registered User
    Join Date
    11-17-2021
    Location
    Saraland, Alabama
    MS-Off Ver
    Microsoft 365 Apps for business
    Posts
    3

    Cut/Paste data from one sheet to another based on cell context

    I am currently trying to enhance a “tracker” I created for my team to use to keep track of their work.

    What I would like to do is cut data from one worksheet and paste it to another based on the context of a cell dropdown. On the sheet I have cut/pasted the data to, I would like there to be an option to restore the same info to the original sheet. I have tried creating a new macro, copying the macros from past worksheets and recording a new macro but in the end, nothing is working for me.


    For example, on the "PENDING" worksheet, if the word "Closed" is selected from the drop down list in Column V, then the macro would select that entire row, copy the entire row, delete the entire row, then pasta the entire row to the "CLOSED" sheet. One the "CLOSED" sheet, the drop down list in the same column, Column V, would say "Restore" and if selected, then the macro would copy the entire row, delete the entire row, then pasta the entire row to the "PENDING" sheet.

    Can one of you wonderful, incredibly smart, people PLEASE help me. I have spent so much time trying to get this to work and I only have failed attempts to show for it.


    THANK YOU!!!!

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,521

    Re: Cut/Paste data from one sheet to another based on cell context

    I don't fall into the category of "wonderful, incredibly smart people".
    Now, if you would have said "incredibly good looking people", that would have been another story.
    I know you're going to say "No conceit in your family, you've got it all!"
    OK, all kidding aside

    Code for the macro button on "Pending" sheet
    Please Login or Register  to view this content.
    Same code for the "CLOSED" sheet except
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Cut/Paste data from one sheet to another based on cell context

    Hello Hankslady,

    Another option would be to use a Worksheet_Change event code which would not require any buttons:-

    Place this code into the "Pending" worksheet module:-

    Please Login or Register  to view this content.
    and this into the "Closed" worksheet module:-
    Please Login or Register  to view this content.
    Thus, as soon as you make a selection from the drop downs, the relevant row of data will be immediately transferred to the relevant work sheet.

    @Jolivanes:-

    I just want some attention too

    I hope that this helps.

    Cheerio,
    vcoolio.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,521

    Re: Cut/Paste data from one sheet to another based on cell context

    Hi vcoolio
    I initially had the same as your suggestion but I thought there could be a possibility of the dat extending past the column in question.
    However, I do think it is the better solution. If there is data past that column, they can always change the V column to a column at the very end.
    By the way, with your good looks, attention comes automatically!!!!!

  5. #5
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Cut/Paste data from one sheet to another based on cell context

    By the way, with your good looks, attention comes automatically!!!!!
    Ya really think!
    Attached Images Attached Images

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,521

    Re: Cut/Paste data from one sheet to another based on cell context

    Best wishes!

    Attachment 755981

  7. #7
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Cut/Paste data from one sheet to another based on cell context

    I can't comment as I get an "Invalid Attachment" error.

    Cheerio,
    vcoolio.

  8. #8
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,521

    Re: Cut/Paste data from one sheet to another based on cell context

    See attached.
    Attached Images Attached Images

+ 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. Cut/Paste data from one sheet to another based on cell context
    By Hankslady in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-22-2021, 01:54 AM
  2. Replies: 24
    Last Post: 06-26-2020, 08:44 AM
  3. [SOLVED] Paste data to another sheet based on cell criteria(s) - VBA Excel 2010
    By magneto_sphere in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2015, 11:40 AM
  4. [SOLVED] Copy paste data one to multiple sheet based on cell value to sheet name
    By kannan1847 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-15-2015, 12:54 AM
  5. [SOLVED] Copy Data Create a New Sheet Name Should be Based On Cell D7 value and paste here
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-16-2014, 01:11 AM
  6. Cannot remove Paste Special from Cell Context Menu
    By Mistweaver in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2014, 03:21 AM
  7. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM

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