+ Reply to Thread
Results 1 to 3 of 3

Copty and Paste to new sheet based on Cell contents

  1. #1
    Registered User
    Join Date
    07-16-2012
    Location
    Edmonton
    MS-Off Ver
    Excel 2003
    Posts
    1

    Red face Copty and Paste to new sheet based on Cell contents

    I have a project for work that we are trying to make as automated and idiot proof as possible.

    What we are looking at doing is when a "Patient Watch" is cancelled, the whole row is copied into the "Cancelled" tab in the next available row.

    I will be the first to admit that my VB skills are on par with a drunk monkey, so I am begging for some help. I have attached a copy of the workbook I am playing around with.

    I was hoping to use formulas and functions instead of VBA, but so far nothing I have tried is working (including any VBA coding that I have found posted around the interweb)


    PLEASE HELP
    Attached Files Attached Files

  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: Copty and Paste to new sheet based on Cell contents

    Couple of questions -

    Do you want the row to be moved or copied?

    Do you want the move/copy to happen when the value changes in column AK or will it be done on a click of a button(so that multiple moves/copies can be done at the same time)?
    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 Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,725

    Re: Copty and Paste to new sheet based on Cell contents

    Phew! Your colours are a bit bright !!

    The attached file does what you want using 3 basic formulae. I've inserted a new column A in both the start_up and Cancelations sheets, and put this formula in A5 of the start_up sheet:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This should be copied down beyond your data to cater for new data being added (the hyphens indicate how far it has been copied), and you could apply protection to the sheet to prevent it being accidentally overwritten, or you could hide the column. The formula just sets up a sequential count of the cancelled records.

    The following formula is in A5 of the Cancelations sheet:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and again this is copied down as far as you think you might need (with hyphens again). This one finds the rows in the start_up sheet where the cancelled records appear.

    The following formula is in B5 of the Cancelations sheet:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and this returns the appropriate data from column B where there is a cancelled record. This formula is then copied across into C5:AM5 to bring the data from the other columns. I've copied across the formats from the start_up sheet, but removed the conditional formatting. Then the whole of row 5 has been copied down to row 13, but could be copied further if required.

    Hope this helps.

    Pete

+ 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