Results 1 to 7 of 7

copy not existing cells from one sheet to another

Threaded View

rana_shaker copy not existing cells from... 12-14-2012, 11:57 AM
AB33 Re: copy not existing cells... 12-14-2012, 12:05 PM
rana_shaker Re: copy not existing cells... 12-14-2012, 12:11 PM
rana_shaker Re: copy not existing cells... 12-14-2012, 12:08 PM
AB33 Re: copy not existing cells... 12-14-2012, 12:17 PM
rana_shaker Re: copy not existing cells... 12-14-2012, 01:07 PM
rana_shaker Re: copy not existing cells... 12-14-2012, 04:25 PM
  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    Amman
    MS-Off Ver
    Excel 2007
    Posts
    36

    copy not existing cells from one sheet to another

    hi ..
    I have "stoke" sheet with a code names in column B ..

    and I have another sheet "sat" .. whith code names in column B starting from B2

    I want a code to check if all codes in "sat" sheet exists in "stoke" sheet and if that code not exists I want to add it to the bottom of "stoke" sheet

    I found this code in the forum from AB33 .. but when I tried it and checked the result ,, I found that some codes not copied ..
    I don't know why ??

    Dim c3 As Range
    Dim c4 As Range
    Dim LR2 As String
    
    With Sheets("sat")
    LR2 = .Cells.Find(what:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    For Each c4 In .Range("B2:B" & LR2)
    Set c3 = Sheets("Stoke").Columns(2).Find(c4, , xlValues, xlWhole)
    If c3 Is Nothing Then
    c4.EntireRow.Copy Sheets("Stoke").Cells(Rows.Count, 1).End(xlUp).Offset(1)
    End If
    Next
    End With

    hope that I can find the answer
    Last edited by rana_shaker; 12-14-2012 at 12:09 PM.

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