Results 1 to 6 of 6

SOLVED: Excel VBA Copy Paste Color Cell Range to Selected Cell

Threaded View

  1. #1
    Registered User
    Join Date
    07-09-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010 64bit
    Posts
    48

    SOLVED: Excel VBA Copy Paste Color Cell Range to Selected Cell

    Hi,

    i am learning vba and would like to copy paste colored cell to another cell, below code does what i want but it only paste the code in column N, ie. N1, how can i paste and change the code to another cell, eg. N10.

    Thanks you so much.

    Sub COLORCELLCOPY()
    Dim LR As Long, i As Long, j As Long
    Dim c As Range
    j = 1
    LR = Range("M" & Rows.Count).End(xlUp).Row
    For Each c In Worksheets("REPORT").Range("O1:O100" & LR)
          If c.Interior.ColorIndex = 4 Then
                c.Copy Destination:=Worksheets("REPORT").Range("N" & j)
                j = j + 1
            End If
    Next c
    End Sub
    Last edited by chhiew; 04-22-2018 at 01:48 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel VBA code to copy a Range and paste it within a cell
    By rshnkmr39 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2014, 02:40 AM
  2. [SOLVED] Macro to copy selected cell and paste value
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-31-2014, 05:53 AM
  3. [SOLVED] Macro to copy selected cell and paste into another (defined) cell.
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2014, 11:36 AM
  4. [SOLVED] Macro: Use cell fill color to determine if to copy & paste to another cell on the same row
    By tsamuels in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-19-2013, 09:50 AM
  5. [SOLVED] copy-paste-selected-cell-range-another-sheet
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 04-26-2013, 06:12 AM
  6. Replies: 2
    Last Post: 11-08-2011, 11:10 AM
  7. Replies: 11
    Last Post: 08-31-2010, 01:30 PM

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