+ Reply to Thread
Results 1 to 7 of 7

Copying cells to another sheet

  1. #1
    Registered User
    Join Date
    05-21-2008
    Location
    London
    MS-Off Ver
    2007
    Posts
    66

    Copying cells to another sheet

    I would like to be able to copy a group of cells from sheet 1 to sheet 2 or 3 based on a value in another cell on sheet 1 eg
    sheet 1
    If Cell A1 = 24, A2=London Road (this make up an address), A5= omit

    If A5 = omit I would like the address copied to sheet 2
    If A5 = Complete I would like it copied to sheet 3

    I have 1600 address to go through.

    Thanks

    Vetequk
    Last edited by Vetequk; 03-15-2009 at 09:00 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Copying cells to another sheet

    Hi

    And where does the next block of data start / end? Is each block 5 rows long and every 5th line has your test requirement?

    Perhaps add a small example file with 4 or 5 items, or if your data has different formats/ number of rows, an example of each, and how this example data should be output.

    rylo

  3. #3
    Registered User
    Join Date
    05-21-2008
    Location
    London
    MS-Off Ver
    2007
    Posts
    66

    Re: Copying cells to another sheet

    rylo
    I have attached a sample file.
    What I am trying to do is filter the list so I can copy all the address that have been omitted to the list sheet, but I only need the the information in the 1st, 2nd & 5th column copied over.


    Thanks

    Vetequk
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copying cells to another sheet

    Your macro seems to work as is for "omit", so you just need to add the "complete" references and another sheet. If the 3rd sheet were called "complete", your macro could expand like so:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    05-21-2008
    Location
    London
    MS-Off Ver
    2007
    Posts
    66

    Smile Re: Copying cells to another sheet

    JBeaucaire
    Thanks for the reply which has been very helpful, but once the data has been filtered the first cell reference could anthing from A9 to last row. I am trying to find away to assign the cell under A8 (once the data has been filtered) to a string.
    This is the code so far:-
    Please Login or Register  to view this content.
    I have highlighed the area that I think is the problem


    Thanks

    Vetequk

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copying cells to another sheet

    I think this solves the problem, also solves the problem of what to do if there are NO "omit" or "complete" results.:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-21-2008
    Location
    London
    MS-Off Ver
    2007
    Posts
    66

    Re: Copying cells to another sheet

    JBeaucaire
    Thanks that worked great

    Vetequk

+ 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