+ Reply to Thread
Results 1 to 12 of 12

Copy formatted cells into another sheet

  1. #1
    Registered User
    Join Date
    11-26-2011
    Location
    romania
    MS-Off Ver
    Excel 2003
    Posts
    22

    Copy formatted cells into another sheet

    Hi guys,

    I'm trying to copy cells formatted in specific way into another sheet.
    To be more specific, I want to copy cells filled with red color from sheet 1 and 2 into sheet 3.

    In Sheet 3, column A is predefined - it contains tables of 6 rows each, separated by 2 blank rows.

    In Sheet 1: If in colum B there is any cell filled with red color, then I want to copy the name of the subject into the first table from Sheet 3. After this, if cell B2 is filled with red color, then I want to copy the value from B2 into Sheet 3, cell B2. If B4 is filled with red, then I want to copy value from B4 into Sheet 3, cell B3.


    In Sheet 2: If in colum B there is any cell filled with red color, then I want to copy the name of the subject into the second table from Sheet 3. After this, if cell B2 is filled with red color, then I want to copy the value from B2 into Sheet 3, cell B10 (as in example).

    Please take a look at the example attached, It might be easier to understant what I want to do. Also, I mention that I will handle about 20 sheets in my daily activity, so, if there is anyone who can help me, please take that in consideration.

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copy formatted cells into another sheet

    See if this is it

    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-26-2011
    Location
    romania
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy formatted cells into another sheet

    Hi Leo,
    It seems to work for the first column (B) but it won't look for any values into the next columns. For example, it should have found the value from sheet 1, cell d2...
    Thanks!

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copy formatted cells into another sheet

    In Sheet 1: If in colum B there is any cell filled with red color, then I want to copy the name of the subject into the first table from Sheet 3. After this, if cell B2 is filled with red color, then I want to copy the value from B2 into Sheet 3, cell B2. If B4 is filled with red, then I want to copy value from B4 into Sheet 3, cell B3.


    In Sheet 2: If in colum B there is any cell filled with red color, then I want to copy the name of the subject into the second table from Sheet 3. After this, if cell B2 is filled with red color, then I want to copy the value from B2 into Sheet 3, cell B10 (as in example).

    so i dont see in the question the other columns
    but i see for it later this day


    Kind regards
    Leo

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy formatted cells into another sheet

    Why does your sample have Victor 3rd Street on Sheet3? None of those cells are red on Sheet1?

  6. #6
    Registered User
    Join Date
    11-26-2011
    Location
    romania
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy formatted cells into another sheet

    My bad...In Sheet 3 should be John 3rd Street.
    The ideea is to copy cells filled with red color into last Sheet.
    So, the complete explanation is this:


    In Sheet 3, column A is predefined - it contains tables of 6 rows each, separated by 2 blank rows.

    In Sheet 1: If in colum B there is any cell filled with red color, then I want to copy the name of the subject into the first table from Sheet 3. After this, if cell B2 is filled with red color, then I want to copy the value from B2 into Sheet 3, cell B2. If B4 is filled with red, then I want to copy value from B4 into Sheet 3, cell B3.
    The next column that has cells filled with red is D, so copy the name of the subject into the first table from Sheet 3 (column C) and the value from D2 (Sheet 2) into C2 (Sheet 3).

    In Sheet 2: If in colum B there is any cell filled with red color, then I want to copy the name of the subject into the second table from Sheet 3. After this, if cell B2 is filled with red color, then I want to copy the value from B2 into Sheet 3, cell B10 (as in example).

    Thank you!

  7. #7
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copy formatted cells into another sheet

    Hello Vicentiu

    see if this is any closer to the desired result


    Kind regards
    Leo
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    11-26-2011
    Location
    romania
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy formatted cells into another sheet

    Leo, you are nothing but the Best!��
    However, when I push the button you've created in sheet 1, it works like a charm, but when I try to run the code from macro list, it will copy only the cells from sheet 2.
    Can you give me a hint about what to do in order to be able to run the code correctly from macro list?

    Thank you!

  9. #9
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copy formatted cells into another sheet

    Please Login or Register  to view this content.
    think the red change is it


    Kind regards
    Leo

  10. #10
    Registered User
    Join Date
    11-26-2011
    Location
    romania
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy formatted cells into another sheet

    It worked!��
    One more thing..
    My table from sheet 1 have another line (right behind the names and it is not formatted) that should be copyed in sheet 3 under the line with names. Also, the table from sheet 1 starts with line 11.
    Can you copy the code just like you did before?

    Thanks!
    Last edited by vicentiu; 09-25-2015 at 04:32 AM.

  11. #11
    Registered User
    Join Date
    11-26-2011
    Location
    romania
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy formatted cells into another sheet

    It worked!��
    One more thing..
    My table from sheet 1 have another line (right behind the names and it is not formatted) that should be copyed in sheet 3 under the line with names. Also, the table from sheet 1 starts with line 11.

    Thanks!

  12. #12
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copy formatted cells into another sheet

    So sheet 1 start at row 11


    Kind regards
    Leo
    Attached Files Attached Files

+ 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. [SOLVED] How do you copy only those cells conditionally formatted to a certain colour?
    By strud in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2013, 05:03 AM
  2. Replies: 4
    Last Post: 06-07-2013, 03:09 AM
  3. Auto copy formatted cells to new worksheet
    By texas tornado in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2012, 12:36 PM
  4. [SOLVED] EXCEL won't copy formatted cells
    By HitTheEXCELerator in forum Excel General
    Replies: 2
    Last Post: 04-22-2012, 02:38 PM
  5. [SOLVED] Copy a formatted table from excel sheet to outlook meeting request.
    By abhay_547 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-05-2010, 08:25 AM
  6. How to Copy a Formatted Row into a Protected Sheet
    By llenger1 in forum Excel General
    Replies: 0
    Last Post: 04-03-2010, 10:20 AM
  7. copy a formatted cell to another sheet as text without format
    By loliemargaret in forum Excel General
    Replies: 4
    Last Post: 10-06-2005, 02:05 PM
  8. Replies: 1
    Last Post: 09-06-2005, 03:02 AM

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