Results 1 to 6 of 6

Select matching cell and insert value 4 cells to the left of selected cell?

Threaded View

  1. #5
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Select matching cell and insert value 4 cells to the left of selected cell?

    OK, does this work? I need to check which code the formatting should be copied from and which it is going to.
    Sub TomToms()
    
    Set ws1 = Worksheets("PO Info Checklist")
    Set ws2 = Worksheets("Closed Jobs List")
    
    Set CheckRange = ws2.Range("A1:A" & ws2.Cells(Rows.Count, "A").End(xlUp).Row)  'closed
    Set SearchRange = ws1.Range("J1:J" & ws1.Cells(Rows.Count, "J").End(xlUp).Row) 'info
    
    For Each cell In CheckRange
    SearchItem = "*" & cell.Value & "*"
    Set c = SearchRange.Find(SearchItem)
        If Not c Is Nothing Then
            c.Offset(, -9).Resize(, 19).Interior.Color = cell.Interior.Color
            c.Offset(, 4).Value = cell.Offset(, 2).Value
            Set c = Nothing
        End If
    Next
    
    End Sub
    Last edited by StephenR; 11-03-2014 at 10:52 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need MACRO to copy the text in the cell left of first selected cells (a column), paste all
    By joobeng in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-16-2013, 06:42 AM
  2. [SOLVED] Using code to select cells that are two cells to the left of the currently active cell
    By LaffyAffy13 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-25-2013, 01:56 PM
  3. Select a Range of Cells Offset from a Selected Merged cell
    By kelvomatic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-07-2013, 05:52 PM
  4. Replies: 0
    Last Post: 05-16-2013, 04:39 PM
  5. [SOLVED] Matching cell content against selected cells - not range
    By ghoneim in forum Excel General
    Replies: 7
    Last Post: 05-02-2013, 03:50 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