+ Reply to Thread
Results 1 to 6 of 6

For each row in Column A copy only corresponding Highlighted cells In other Columns

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    6

    For each row in Column A copy only corresponding Highlighted cells In other Columns

    Hi,

    For each row in Column A, I need to copy only corresponding Highlighted cells In other Columns to new sheet.

    For example, For A1 only M1 and N1 are highlighted in Yellow. B1:L1 are not Highlighted.

    I want to copy only A1,M1 and N1 to the new sheet and remove the rest.


    Thanks in advance for your help.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: For each row in Column A copy only corresponding Highlighted cells In other Columns

    attach please a sample file
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: For each row in Column A copy only corresponding Highlighted cells In other Columns

    Hi, boorama,

    highlighted by Conditional Formatting, individual colouring or Style? If itīs the latter two of the three: get the last used row in column A, check for any cell in each row if the interior colour matches the wanted, build a range and then copy the range to a new sheet under the existing records.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    03-13-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: For each row in Column A copy only corresponding Highlighted cells In other Columns

    Sample.xlsx


    Thanks for your quick response. Attached is a sample file.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: For each row in Column A copy only corresponding Highlighted cells In other Columns

    Hi, boorama,

    maybe this may serve as a starting point:
    Please Login or Register  to view this content.
    Please test the code on a copy of your original workbook.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose Tools | Macro | Macros
    Select a macro in the list, and click the Run button
    Ciao,
    Holger

  6. #6
    Registered User
    Join Date
    03-13-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: For each row in Column A copy only corresponding Highlighted cells In other Columns

    Many Thanks Holger.

    It works great.

+ 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